CSSLint / csslint

Automated linting of Cascading Stylesheets
http://csslint.net
Other
4.77k stars 483 forks source link

Unqualified attributes selectors warning obsolete? #651

Open Volker-E opened 8 years ago

Volker-E commented 8 years ago

The wiki states

Unqualified attribute selectors, such as [type=text], match all elements first and then check their attributes. This means unqualified attribute selectors have the same performance characteristics as the universal selector (*).

normalize v4.0.0 removed the preceding element selector (e.g. input[type=search]) for a good reason – to lower selector specificity. @jonathantneal was also adding CSS selector comparison performance tests and it seemed not to have any negative performance influence in modern browsers at all.

Therefore I'd suggest to either drop the rule completely or thoroughly clarify when useful on the wiki.

Somewhat related to #453 – only different direction. ;)