#todayilearned

by @jm3 · aka John Manoogian3

Frequent, bite-size mini-milestone updates as I fast-forward merge* my front-end web development skills up to 2019 levels. Learn more

CSS selector performance

Posted at — Jun 6, 2019

It turns out that with large websites and stylesheets, parsing many element-attribute selectors like div[data-v-foo] is much slower than parsing many class-attr selectors like .cool-btn[data-v-foo], so prefer the class-attr selector style when possible.

View some Performance test results.