On 31 March 2011 13:49, Markus Ernst <derer...@gmx.ch> wrote:
> I could imagine a hypothetic Web application that generates class names from
> any other information, which may start with a digit. Thus class names may
> not even be known at coding time. In that case, escaping all digits might be
> a valuable alternative.

In that situation I would be more eager to use [class~=1] selectors —
at least they are human readable and reproducible without any external
methods.

If you're dealing with a web app that procedurally generates
identifiers beginning with digits and you have to support IE6-7,
you've probably got bigger things to worry about ;)


On 31 March 2011 14:07, Philippe Wittenbergh <e...@l-c-n.com> wrote:
> On Mar 31, 2011, at 8:12 PM, Barney Carroll wrote:
>> 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?
>
> HTML 4 has / had this:
> http://www.w3.org/TR/html401/types.html#type-name
> (linked from
> http://www.w3.org/TR/html401/struct/global.html#adef-id )
>
> Class is looser
> http://www.w3.org/TR/html401/types.html#type-cdata
>
> HTML5 doesn't seem to impose limits, afaict
> http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#the-id-attribute

Thanks for the research Phil. So this is a hangover from HTML4 spec
(which is hardly self-explanatory of itself). To be perfectly honest,
the times where I've initially actually wanted to use leading digits
as identifying strings, it's semantics rather than the practical
limitation that have made me reconsider — numbers unqualified by
descriptors can lead to all sorts of nonsense.


Regards,
Barney Carroll

barney.carr...@gmail.com
07594 506 381
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
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/

Reply via email to