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.
Even 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.
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.