coffee-sheets
v0.1.4
Published
CSS as CoffeeScript, for web components
Downloads
1
Maintainers
Readme
Coffee Sheets
CSS as CoffeeScript, for web components
Work in progress.
Small utility that lets you define CSS rules using only CoffeeScript, and then dynamically add those to a style tag in the current page. Coffee sheets are meant to be used by web components that need to add style rules to the current page whenever they are rendered for the first time.
In order to minimize unpredictable rule overrides depending on order of requiry, we use several "levels", so that different coffee sheets included after one another get interlaced rather than being concatenated in the order of inclusion.
Why would anyone use CoffeeScript to write CSS? Mostly to make the styles part of the same dependency graph as the rest of the code, but also potentially in order to delay the loading of styles until those styles are actually needed.
Coffee sheets was created mostly to be part of the Zodiac reactive SPA toolkit, and you will find more documentation there.