4 ms·
Agreed, the CSS is really inefficient, for every anchor tag, the browser has to traverse the DOM up to the root element 6 times (not including the hover rules)
by lazyjones 14y ago
Agreed, the CSS is really inefficient, for every anchor tag, the browser has to traverse the DOM up to the root element 6 times (not including the hover rules) ... It's a shame that so many developers don't know this (it's not very intuitive though).
- ceol 14y agoCSS optimization should be the last thing a developer does, if at all. Most of the time, it's not worth it. As a general rule, just be as concise as possible. `.nav ul.actions li a` could be turned into `.actions a` as long as it's alright for the .action anchor tags not in the .nav element to have the same style. But if you use .actions elsewhere and want the .actions list to look different in .nav, that's fine.