Lossy compression of CSS for fun and loss (or profit)
This program takes CSS and outputs back smaller CSS that hopefully retains some (most) of the information in the input, but contains fewer rules than the original. Exactly how many rules it produces is configurable.
See this blog post.
You'll need Clojure (follow the installation instructions).
You will also need to build the code from this repo. Follow the instructions in the Makefile, then copy all the resulting driver*
binaries into one directory. Also, copy the wrapper.sh
script from this repo to that same directory.
Edit src/cssfact/matrix.clj
and point it at the directory with all the binaries and the wrapper script.
Now, you can run:
clojure -M:run -i some-css.css
Tip: you can also pass a URL as an input file!
This code is licensed under the Opinionated Queer License, version 1.1.