WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
17686
CSS3 Selector Test: negation pseudo-class should only accept simple selectors
https://bugs.webkit.org/show_bug.cgi?id=17686
Summary
CSS3 Selector Test: negation pseudo-class should only accept simple selectors
Eric Seidel (no email)
Reported
2008-03-05 14:02:41 PST
CSS3 Selector Test: negation pseudo-class should only accept simple selectors .blox16 { background-color: red; } .blox16:not(.blox15) { background-color: lime; } .blox16:not(.blox15[foo="blox14"]) { background-color: red; } <div class="blox16 unitTest" foo="blox15" title="negation pseudo-class accepts only simple selectors for argument"></div>
Attachments
test case
(256 bytes, text/html)
2008-03-27 12:44 PDT
,
Robert Blaut
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Robert Blaut
Comment 1
2008-03-05 15:45:02 PST
I wonder if this test is valid. simple selectors are "either a type selector, universal selector, attribute selector, class selector, ID selector, content selector, or pseudo-class. One pseudo-element may be appended to the last sequence of simple selectors." In this case we have attribute selector and class selector. It seems that the combination of simple selectors are not simple selector any more but you should notice that an attribute selector is always combination of attribute selector and other simple selector ;) For me the test case is invalid. Links to CSS Selectors spec:
http://www.w3.org/TR/css3-selectors/#negation
http://www.w3.org/TR/css3-selectors/#simple-selectors-dfn
http://www.w3.org/TR/css3-selectors/#attribute-selectors
Dave Hyatt
Comment 2
2008-03-05 15:50:24 PST
Yes, I posted on the author's blog even. I don't think we should fix this.
Robert Blaut
Comment 3
2008-03-27 12:43:58 PDT
Some more words on this subject. Regarding attribute selectors, some people can claim: "Wait a second, "[class="test"]" is really simple selector and notation :not([class="test"] works as expected in Firefox and Opera and of cause in Webkit"? So is a [class="test"] really simple selector? No! Take a look on this fragment in specification: "The universal selector, written "asterisk" (*), represents the qualified name of any element type.[...] If the universal selector is not the only component of a sequence of simple selectors, the * may be omitted. Examples: *[hreflang|=en] and [hreflang|=en] are equivalent" [
http://www.w3.org/TR/css3-selectors/#universal-selector
] So this case "[class="test"]" is a simplified version of "*[class="test"]" and it is a sequence of simple selectors. Both cases a logically equal. So in my opinion, it's absolutely incorrect that this case :not(*[class="test"]) - which is logically equivalent to :not([class="test"]) - does not work in Firefox and Opera, . Take a look at an attached test case. Ian, you are an editor of CSS3 Selectors specification. what you think about this issue?
Robert Blaut
Comment 4
2008-03-27 12:44:45 PDT
Created
attachment 20134
[details]
test case
Dave Hyatt
Comment 5
2008-03-28 23:14:12 PDT
This may change. Not fixing yet. Brought it up with the CSS WG.
James Craig
Comment 6
2013-10-31 16:58:20 PDT
This has changed for CSS4. Suggest closing.
Ahmad Saleem
Comment 7
2022-08-07 13:36:32 PDT
I am unable to reproduce this bug in Safari 15.6 on macOS 12.5 and the attached test case show both line with lime / green background and it matches with other browsers (Chrome Canary 106 and Firefox Nightly 105). I am marking this as "RESOLVED CONFIGURATION CHANGED". Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug