softdrink

0.1.0

Tools to inline or extract CSS into/from HTML.

About Softdrink

Softdrink is a small toolkit to extract CSS from HTML or inline it. Softdrink relies on lQuery and LASS.

How To

Extracting style information happens with slurp.

(softdrink:slurp "<div><foo/><foo id=\"bla\" style=\"bar:baz;bluh: bbab\" /></div>")

Injecting CSS back in happens with mix. You can then prettify the output with pour.

(softdrink:pour (softdrink:mix "<foo><p/></foo>" '(p :text-decoration underline)))

Softdrink includes support for the LASS item-types :BLOCK and :PROPERTY. Any other type needs to be added with DEFINE-INLINER or DEFINE-MANIPULATOR.

See Also

  • lQuery, used to easily traverse and manipulate the DOM
  • LASS, to process and markup CSS in a more Lispy manner.
  • Plump, to parse and serialize X(HT)ML.

Package Index