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

Method writeScss

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

Write the collect set of SCSS variables to path.

(self, path)

Source from the content-addressed store, hash-verified

459 # S A S S
460
461 def writeScss(self, path):
462 """Write the collect set of SCSS variables to path."""
463 try:
464 f = codecs.open(path, 'w', 'utf-8')
465 for scssId, value in sorted(self._scssVariables.items()):
466 f.write('$%s: %s;\n' % (scssId, value))
467 f.close()
468 except IOError:
469 print('[HtmlBuilder.writeSass] Cannot write SCSS file "%s"' % path)
470
471 def compileScss(self, scssPath, cssPath=None, compressed=True):
472 """For now using sass to support SCSS. SASS support could be added later."""

Callers 1

build_cssMethod · 0.95

Calls 2

writeMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected