Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

softdrink

2023-10-21

Tools to inline or extract CSS into/from HTML.

Upstream URL

github.com/Shinmera/softdrink

Author

Yukari Hafner <shinmera@tymoon.eu>

Maintainer

Yukari Hafner <shinmera@tymoon.eu>

License

zlib
README

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.

Dependencies (2)

  • lass
  • lquery

Dependents (0)

    • GitHub
    • Quicklisp