Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.

[1] https://github.com/gildas-lormeau/SingleFile [2] https://github.com/gildas-lormeau/SingleFileZ




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: