12 ms·
I think you've missed the point. I'm not saying that using the cascade is bad, I'm saying that you need to have better control over it. Applying styles in the g
by anthonyshort 14y ago
I think you've missed the point. I'm not saying that using the cascade is bad, I'm saying that you need to have better control over it. Applying styles in the global scope gives you no control over it. When I say "global type styles" I'm referring to styles in the global scope, not cascaded styles.
You need to be able to separate your styles into layout and decoration for them to be re-usable. Anything in the global scope becomes a problem. It's the same as writing modular code in any other language.
Regarding the rendering speed, it has been proven multiple times that the performance impact of wildcard selectors is so unnoticeable it's not worth even worrying about at all.
When you build anything large enough that needs to be maintained and scaled by a team of people you need to limit to the cascading of styles or your stylesheets will grow out of control. So yes, the cascade can bite you in the ass and does suck unless you know how to control it.