On 30/04/2011 12:53 PM, Philippe Wittenbergh wrote:
On Apr 29, 2011, at 11:24 PM, Alan Gresley wrote:
This is not completely true. Firstly the XHTML is traditional so
it's not true XHTML
That doesn't matter, as ID's starting with a leading digit are not
allowed in html4.01.
True. It's not allowed by the spec but that doesn't mean that this can't
be done. In the example that this thread is about, maybe it is wise just
to use 'col1' but many times in my own work it would have been easier if
I could have identified something just with digits or beginning with digits.
Beside, XHTML strict served as text/html is
handled just the same as html4.01 by browsers.
http://www.w3.org/TR/html401/types.html#type-name
I know. Pages with the bells and whistles
(content="application/xhtml+xml) are still served as text/html and
handled as html4.01 by browsers.
and secondly, IDs or classes beginning with a digit that is in an
escape sequence (flowed by one space of whitespace) is valid CSS.
The CSS selector is only valid when the (leading) digit is escaped…
IOW: #4col1 {background: lime;} is invalid (and correctly ignored by
browsers)
Correct.
but #\34col1 {background: lime;} is valid
This is incorrect since this is an identifier. It needs white-space. If
the HTML has this attribute,
id="2a"
then it must be selected by this (with whitespace in between '2' and 'a').
#\32 a
A test.
http://css-class.com/test/temp/escape-ident-whitespace.xml
BTW, according to the validator, that document is invalid (4 Errors and
1 warning). The warning is solely due to my server settings. To stop
that warning, I must use the proper .xhtml extension.
http://css-class.com/test/temp/escape-ident-whitespace.xhtml
--
Alan Gresley
http://css-3d.org/
http://css-class.com/
______________________________________________________________________
css-discuss [[email protected]]
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/