dosyago / cssfact

Lossy compression of CSS for fun and loss (or profit)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cssfact

Lossy compression of CSS for fun and loss (or profit)

WTF?

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.

Running it

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!

License

This code is licensed under the Opinionated Queer License, version 1.1.

About

Lossy compression of CSS for fun and loss (or profit)


Languages

Language:Clojure 99.2%Language:Shell 0.8%