what's the disadvantage of having lots of css selectors?
What is the disadvantage of having many CSS selectors?
Are there any performance problems associated with having lots of CSS selectors? Any links/real tests?
I've found https://addons.mozilla.org/en-us/firefox/addon/css-usage/ and the o开发者_如何学运维nly reason why i see its use is because it might help removing unused CSS classes from the final CSS so it would be smaller. But its cached by the browser anyway so i see a problem with its size.
It has a mild effect on render performance, but the main reason for avoiding it is that it tends to be a bad smell, indicating complicated overrides between different rules, resulting in a hard-to-maintain stylesheet.
精彩评论