sa***@fendoo.com wrote:
But this method fails if one of b, c, or d is greater than 9."
This demonstrates that you overlooked their examples, in which they did
exactly this--concatenating the numbers, treating them as digits base
10--and the part where they wrote "in a number system with a large
base", which deals head-on with the case where any of the numbers is
greater than 9. In other words, this isn't a "method currently popular".
It's the way the computation was defined.
Harlan, you are refering to the CSS 2 specification.
The CSS 2.1 Specification switched to defining the specificity of a
selector as comma-delimited quad of integers for the precise reason I
give.
Hmm, don't know why my link wasn't updated. It doesn't matter, though.
What you wrote is what 2.0 had, and I figure they dropped it from 2.1
because while it was meant to help explain it, it probably just caused
more confusion, and for no purpose, because as has been pointed out to
you, an absolute number doesn't mean anything.
How do you compare numbers you see on paper? How do you alphabetize
words? By exactly the same process used in the spec for the
comma-separated numbers. The only difference between the comma-separated
convention and the rendering of a number to some base is the presence or
absence of the commas! Conceptualizing the specificity as an absolute
number rather than as a set of values adds nothing.