2011/9/6 Nathan Sweet <[email protected]>:
> I should amend my claim. Try it without quotes now. Why are quotes important
> in this case, and certainly the spec never says they are required or change
> the process in anyway, maybe this is where I'm going wrong. My engine works
> with and without quotes, but maybe it shouldn't?

As for ANY CSS property value, that is more than one word you should
use quotes, like font names. That this would apply to selectors too.

http://www.w3.org/TR/css3-selectors/#attribute-selectors

See the specification for identifiers
http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier

> Attribute values must be CSS identifiers or strings.

See the specification for strings
http://www.w3.org/TR/CSS21/syndata.html#strings

> In CSS, identifiers (including element names, classes, and IDs in selectors)
> can contain only the characters [a-zA-Z0-9] and ISO 10646 characters U+00A0
> and higher, plus the hyphen (-) and the underscore (_); they cannot start 
> with a
> digit, two hyphens, or a hyphen followed by a digit.

See the specification for strings
http://www.w3.org/TR/CSS21/syndata.html#strings

> Strings can either be written with double quotes or with single quotes. Double
> quotes cannot occur inside double quotes, unless escaped
> (e.g., as '\"'  or as '\22'). Analogously for single quotes (e.g., "\'" or 
> "\27").

-- 
Poetro

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to