by sandreas · 4y ago · 0 comments
I ask, because in the early days of css we also tried to use semantic style and had strange rendering issues on huge data tables and everytime, when the page had a lot of content. After trying a few things we came to the conclusion, that (especially but not only) IE had huge performance issues with semantic style. After switching to classes, everything worked fine. It technically made no sense, but since we did not change anything else, we came to the conclusion, that class based is faster than semantic...
Did anyone ever measure this for modern browsers?
Engines are now good enough you don’t really have to worry about selector performance unless you’re using ridiculously complex selectors, and even then the least efficient part is actually the layout calculation and painting.
This site is super simple and is super laggy on Safari Mac because they use awkward effects and animated gradient backgrounds, for example: https://colorjs.io/
Nowadays you’ll have a thousand problems worth solving before you get to fussing over selectors.
https://frontstuff.io/you-need-to-stop-targeting-tags-in-css...