|
Posted by Els on 02/26/06 16:40
Michael Winter wrote:
> On 26/02/2006 09:21, Els wrote:
>
> [snip]
>
>> (If I understood appendix B of the CSS1 specs correctly (of which I'm
>> not sure), only 1 class/id/pseudo-class is allowed per selector in
>> CSS1)
>
> I'm not quite sure what you're trying to express, here.
>
> .className or #id
>
> but not
>
> #id.className
That's what I figured appendix B is saying.
Apparently it isn't though:
> As I read it, the grammar permits the latter, but it also places very
> tight constraints on the /order/ of simple selector components: element,
> id, class, pseudo-class. A simple selector can contain any of these, but
> if any are present, they must appear in that order and can only occur
> once at most.
>
> The reason why
>
> .subsubsection#sverige a
>
> fails is because the id selector follows the class name.
>
> #sverige.subsubsection a
>
> will be accepted.
Yes, that CSS1 checker does accept that. I didn't expect that.
> Note that the W3C validator doesn't care much for the order, either
> because it wasn't meant to be significant (but that fact couldn't be
> expressed concisely in the grammar), or due to a bug.
Well, I'll just stick to CSS2.1, which I mostly understand, and
combine that with what works in the browsers. Life can be so easy ;-)
--
Els http://locusmeus.com/
[Back to original message]
|