4 ms·
According to the CSS 2.1 spec, “Concatenating the four numbers a-b-c-d (in a number system with a large base) gives the specificity.” Base-256 is the obvious wa
by yonran 14y ago
According to the CSS 2.1 spec, “Concatenating the four numbers a-b-c-d (in a number system with a large base) gives the specificity.” Base-256 is the obvious way to encode each digit efficiently, and I suppose all browsers that do this are still in compliance with the spec.
- mmahemoff 14y agoIt still works with > 256 classes. I was expecting it to overflow and go back to blue when I added a 257th class.
- SoftwareMaven 14y agoIf it is adding numbers, it may be losing the ID altogether. spec = classes + (id>>8) + (important>>16) + (styles>>24); If the assumption was that classes would "probably" be under 256 and wasn't put in a char, it could be messing with the whole value.