Sent by Barney Carroll on 31 March 2011 12:12
On 31 March 2011 11:38, Philip Taylor (Webmaster, Ret'd)
> The specification says "they cannot start with a digit"; Alan says
> "they can start with numbers"; the question is therefore "are there
> numbers that are not digits", and Alan is arguing "yes, if the
> number is encoded using a character escape" (e.g., \31 to represent
> the digit/number "1").
Thanks for translating, this stuff needs patience and interpretive skills! ;)
Isn't this a hack in some sense? As you've pointed out, starting with
a digit is contra-spec. Alan is saying an identifier starting with a
digit can be used, but one has to express it in such a way that, in
its explicit written form, it does not appear as a digit, and one way
of doing that is by expressing the number under a different,
non-digital encoding (only in the CSS â€” using the same string in the
HTML wouldn't work).
It's not at all obvious, and it employs a counter-intuitive writing
method for the express purpose of evading constrictions expressed in
other parts of the spec.
A more intuitive and certainly more readable method (but less
widely-supported â€” although at this point I am purely academically
interested in W3 errata, since both methods are non-standard and
confusing unless the viewer has express knowledge of it) would be to
express the selector via the attribute selection pattern:
Again, as far as I'm concerned, this is all academic. I work on large
projects that must be able to be maintained by people with generic
industry standard working knowledge, so I wouldn't allow this in at
the risk of confusing colleagues & successors.
But even from that angle, can this be considered good practice? Isn't
it contrary to the specification's intentions in forbidding digit-led
identifiers using the standard methods? Would you genuinely suggest
this advice to the OP, or is this purely an exercise in exploiting
A simpler question, that has still yet to be answered, is why
digit-led class or id identifiers are banned in the first place. Alan,
Phil â€” any ideas?
07594 506 381
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/