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

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
http://www.w3.org/TR/CSS21/syndata.html#rule-sets



> 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
comma).


Gérard
-- 
CSS 2.1 Test suite RC6, March 23rd 2011
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

Contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

Web authors' contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html

Received on Friday, 9 March 2012 04:10:38 UTC