Cascade: A Typed CSS Toolkit in OCaml

I’m happy to announce the first release of cascade available in opam (opam install cascade) and in brew (brew install samoht/tap/cascade).

Cascade is a library:

  • a typed AST to represent CSS documents;
  • a set of (cascade-order preserving) transformations over that AST. This includes: minification of (leaf) values (lots of fun with colour-space coordinate), optimisations (aka semantic-preserving node rewrites following the great SatCSS paper), semantic-preserving canonisation, and more;
  • a diff function to compare those (optionally canonised) ASTs;
  • an apply function to apply a CSS value to an HTML document as style attributes, preserving the cascade-order.

But cascade is also a CLI tool! All of those operations are available as subcommands (with cascade fmt, cascade diff and cascade apply).

You can read more details here: Thomas Gazagnaire :: Cascade: A Typed CSS Toolkit in OCaml

You are very welcome to report issues or discuss about ideas on the GH tracker.

5 Likes