4 ms·
For some reason, based on the w3 documentation, I was under the impression that an id had an order of magnitude more specificity than a class. http://www.w3.or
by dclowd9901 14y ago
For some reason, based on the w3 documentation, I was under the impression that an id had an order of magnitude more specificity than a class.
http://www.w3.org/TR/CSS2/cascade.html#specificity http://www.w3.org/TR/CSS2/cascade.html#specificity
- bingaling 14y agoI think it has _2_ (base 10) orders of magnitude more specificity. That's 10 times more specificity (than a single order)!
- sirclueless 14y agoOne might even say it has an order of magnitude more specificity than a single order.
- bodhi 14y agoFrom that spec: > Concatenating the four numbers a-b-c-d (in a number system with a large base) gives the specificity. So webkit is using 256 as "a large base". I only just read this spec a few months ago. For years I was under the impression that the spec was "1 point for an element, 5 for a class, 10 for an id", and the selector with the highest point value won...