Quantcast
Channel: Why are selectors such as a[title="home"] slower than using class? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by daniel__ for Why are selectors such as a[title="home"] slower than...

BenchmarkConclusionsIn most cases 'attribute selector with unknown attribute, e.g. [a="b"]' and 'attribute selector with known attribute, e.g. [title="a"]' showed up in the '3 Worst' category. It's...

View Article



Answer by Barmar for Why are selectors such as a[title="home"] slower than...

Browser implementors optimize the most common cases. Since classes are used very frequently to match styles, they must implement this as efficiently as they can. When they load in CSS, they index the...

View Article

Why are selectors such as a[title="home"] slower than using class?

I have been reading a lot of CSS performance articles, such as;Efficiently Rendering CSSWriting efficient CSS selectorsWriting efficient CSSI get why selectors like this are bad#social a {}As the...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images