Hacker News new | ask | show | jobs
by martijndeh 3396 days ago
I'm curious though, how do these minifications, or CSS minifications in general, affect runtime performance? Reducing the file size is great, and a goal in itself (though brotli is more important where gzip is supported), but another important goal is rendering the page fast. Some CSS selectors are faster than others, is this something minifiers take into account? Or is this not significant at all?
1 comments

Changing selectors would be an unsafe transform (how could the minifier know that the new selector matches the DOM?) and it's not related at all. Even if it was, selector speed isn't really relevant, the changes are way too miniscule.