W3C home > Mailing lists > Public > www-style@w3.org > March 2012

Re: Allowing unknown pseudo classes and unknown pseudo element in the selector.

From: Gérard Talbot <www-style@gtalbot.org>
Date: Thu, 8 Mar 2012 23:10:08 -0500
Message-ID: <910275800b7e8c4719c52bff02e2fcae.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Erik Arvidsson" <arv@chromium.org>
Cc: www-style@w3.org

Le Jeu 8 mars 2012 13:52, Erik Arvidsson a écrit :
> Today we have a "bug" in WebKit [1] where we ignore unknown pseudo
> elements.
> #test { background: green }
> #test, ::foobar { background: red }
> in WebKit #test is red, in other browsers it is green.

The other browsers are correct..

... because this is how the comma separator is supposed to work.

"since it is not known if the comma may acquire other meanings in future
updates of CSS, the whole statement should be ignored if there is an error
anywhere in the selector, even though the rest of the selector may look
reasonable in CSS 2.1."
CSS 2.1, Section 4.1.7 Rule sets, declaration blocks, and selectors

> This intended behavior is actually making things worse. If the page
> author includes a new pseudo element/class from CSS4 and then a user
> visits the page in a browser that does not support the CSS4 pseudo the
> whole rule gets dropped.

... and if a user visits the page in a browser that does support the CSS4
pseudo, then the whole rules gets applied.

> This is a real problem today when browsers
> introduce new experimental pseudo elements and classes.

Maybe the problem is with inserting new experimental stuff in the selector
part of a rule *with* other normal, supported stuff (separated with a

CSS 2.1 Test suite RC6, March 23rd 2011

Contributions to CSS 2.1 test suite

Web authors' contributions to CSS 2.1 test suite
Received on Friday, 9 March 2012 04:10:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:13 UTC