[Bug 15224] New: A class name can not be appended to a pseudo-element: p:first-line.some_class_name should be parsed as INVALID

https://www.w3.org/Bugs/Public/show_bug.cgi?id=15224

           Summary: A class name can not be appended to a pseudo-element:
                    p:first-line.some_class_name should be parsed as
                    INVALID
           Product: CSSValidator
           Version: CSS Validator
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: CSS 2.1
        AssignedTo: dave.null@w3.org
        ReportedBy: info@gtalbot.org
         QAContact: www-validator-cvs@w3.org


URL of test
-----------

http://test.csswg.org/suites/css2.1/20110323/html4/c25-pseudo-elmnt-000.htm


Relevant chunk of CSS code
--------------------------

p:first-line.some_class_name { ... set of css declarations ...}

should be parsed as INVALID selector by the CSS validator because


CSS 2.1 section 5.10
--------------------

CSS 2.1 states 
"pseudo-elements may only be appended after the last simple selector of the
selector"
section 5.10 Pseudo-elements and pseudo-classes
http://www.w3.org/TR/CSS21/selector.html#pseudo-elements


Additional info
---------------

Firefox 8.0 Error console reports this as a parsing error:
"
Warning : A token was found following a pseudo-element, which must be the last
part of a selector : « . ».  Set of rules ignored due to a bad selector.
File Source :
http://test.csswg.org/suites/css2.1/20110323/html4/c25-pseudo-elmnt-000.htm
Line : 12
"

Opera 11.60 Error console reports this as a parsing error:
"
Inlined stylesheet
A pseudo element must be the last part of the selector.
Line 14:
     p:first-line.two { color: yellow; background: red; }
"

Even CSS 1 states
"
When combined with classes or pseudo-classes, pseudo-elements must be specified
at the end of the selector.
"
CSS 1, section 2.5 Pseudo-elements in selectors
http://www.w3.org/TR/CSS1/#pseudo-elements-in-selectors


URL of CSS validation report
----------------------------

http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Ftest.csswg.org%2Fsuites%2Fcss2.1%2F20110323%2Fhtml4%2Fc25-pseudo-elmnt-000.htm&profile=css21&usermedium=all&warning=2&vextwarning=&lang=en

Expected result
---------------

p:first-line.two should be reported as INVALID CSS code and rejected CSS code.


Actual result
-------------
p:first-line.two { ... } is reported as Valid CSS information



regards, Gérard Talbot

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Friday, 16 December 2011 02:54:22 UTC