MCPcopy Create free account
hub / github.com/PageBot/PageBot / addCss

Method addCss

Lib/pagebot/contexts/htmlcontext/htmlbuilder.py:401–406  ·  view source on GitHub ↗

Add the css chunk to self.css, the ordered list of css for output. Don't write if empty or None.

(self, css)

Source from the content-addressed store, hash-verified

399 # C S S
400
401 def addCss(self, css):
402 """Add the css chunk to self.css, the ordered list of css for output.
403 Don't write if empty or None."""
404 if css:
405 assert isinstance(css, str), ('Added CSS should be of type str "%s"' % css)
406 self._cssOut.append(css)
407
408 def containsCss(self, css):
409 """Answer the boolean string if this css already exists in the self._cssOut."""

Callers 6

importCssMethod · 0.95
headerCssMethod · 0.95
resetCssMethod · 0.95
sectionCssMethod · 0.95
build_cssMethod · 0.95
build_htmlMethod · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected