4 ms·
I like this. One of the things that has always bugged me about CSS is that after a few iterations you get non-obvious interactions between rules. In fact, I’d
by rcarmo 7y ago
I like this. One of the things that has always bugged me about CSS is that after a few iterations you get non-obvious interactions between rules.
In fact, I’d love to have a CLI tool that would take a website (or a set of CSS files and a sample HTML layout) and spat out the minimally effective CSS required for it — an optimizing compiler, if you would.
- gildas 7y agoEven though it's not a compiler, SingleFile [1](and SingleFileZ [2]) can do that. It will compute the cascade, remove almost all the unnecessary rules, and minify the CSS. [1] https://github.com/gildas-lormeau/SingleFile https://github.com/gildas-lormeau/SingleFile [2] https://github.com/gildas-lormeau/SingleFileZ https://github.com/gildas-lormeau/SingleFileZ