Build the CSS for this document. Default behavior is to import the content of the file if there is a path reference, otherwise build the CSS from the available values and parameters in self.style and self.css().
(self, view, origin=None)
| 28 | return HtmlContext() |
| 29 | |
| 30 | def XXXbuild_scss(self, view, origin=None): |
| 31 | """Build the CSS for this document. Default behavior is to import the |
| 32 | content of the file if there is a path reference, otherwise build the |
| 33 | CSS from the available values and parameters in self.style and |
| 34 | self.css().""" |
| 35 | b = view.context.b |
| 36 | if self.cssCode is not None: |
| 37 | b.addHtml(self.cssCode) |
| 38 | elif self.cssPath is not None: |
| 39 | b.importCss(self.cssPath) # Add CSS content of file, if path is not None and the file exists. |
| 40 | else: |
| 41 | b.headerCss(self.into.title or self.name or self.title) |
| 42 | b.resetCss() # Add CSS to reset specific default behavior of browsers. |
| 43 | b.sectionCss('Document root style') |
| 44 | b.css('body', e=view) # <body> selector and style output |
| 45 | |
| 46 | # Alternative view behavior. |
| 47 | # Because HTML-pages don't really need or handle print-view options |