Skip to content

Instantly share code, notes, and snippets.

@DamonOehlman
Created October 31, 2013 10:21
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save DamonOehlman/7247410 to your computer and use it in GitHub Desktop.
Save DamonOehlman/7247410 to your computer and use it in GitHub Desktop.
Modules in NPM that look interesting with regards to generating CSS with JS (and some other things discovered along the way).

Currently trawling NPM in search of a node module that makes working with CSS and browserified code "feel" better. My first thought was to seek out an existing project (or create one) that took a programmatic approach to CSS generation.

Here's what I've found:

Generators in Code

Shortlist

  • jcss: Some nice features, and worthy of further investigation. Looks active.

  • barber: Nice syntax, has taken into consideration namespaces. Definitely worth a look :)

Others

  • css-sourcery: general approach looks ok, too much having to write src.rule, src.compile though.

  • styleless: More programmatic generation. Using object literals pretty effectively to map to CSS.

  • csster: Similar to styless

Packaging Approaches

Shortlist

  • npm-css: Nice approach to being able to package css into node modules. Thinking it needs the ability to rewrite and namespace though to be really useful. Maybe shadow DOM stuff will make it useful though...

Others

Useful Modules

  • XCSSMatrix - Nice CSS matrix operations library, XCSSMatrix polyfill. Reckon this is pretty useful when used in conjunction with JS generated CSS.

  • mensch - CSS Parser. Likely it will be useful at some point :)

  • css-parse - Another CSS Parser.

  • csso - CSS Optimizer. Very clever from a quick glance.

@brianleroux
Copy link

We are working on this in Topcoat. It is early.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment