3 ms·
gzip takes care of the repetition and I don't think CSS parsing has any meaningful impact when you consider all the freak show of resources and scripts a typica
by positivecomment 9y ago
gzip takes care of the repetition and I don't think CSS parsing has any meaningful impact when you consider all the freak show of resources and scripts a typical page loads (I have no data on this though, just intuition).
A maintainable CSS is way, way more important. Writing complex CSS is very easy, but debugging can be a nightmare.
- TheCycoONE 9y agoAnd http2 takes care of concatenation.
- StavrosK 9y agoAre there any tests anywhere to see if concatenated and separate files over http2 take the same time to be delivered? It would be very interesting if the times were equal in practice too.
- tehlike 9y agobrotli ftw.
- HugoDaniel 9y agoIf it is repeated then it is harder to maintain. If you have worked on a big project you know that it is way harder you have to change things in a few dif. places instead of just one, and there will be much harder to maintain consistency accross your style. Can you give a counter-example where repeating CSS improves maintainability ?
- positivecomment 9y agoWhen you have a base style sheet (it can be a framework or a base style sheet for your main application and sections overwriting them or custom style sheets for some tenants of your application or whatever) that you want to customize? Many component-based designs also prefer repeating styles for each component because of maintainability but I guess they wouldn't be counted in the article as they use generated root names. My point is, not repeating styles should not be the target, but it may of course be the side-effect.