0.1.4 • Published 8 years ago

coffee-sheets v0.1.4

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

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.