Bug 62520 (Specificity:not(el))

Summary: A type selector within negation should have a specificity of 0:1:0
Product: WebKit Reporter: Alan Gresley <alan>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: aboxhall, alan
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: All   
OS: All   
URL: http://css-class.com/test/css/selectors/specificity-negation.htm

Alan Gresley
Reported 2011-06-12 15:59:54 PDT
Always reproduce-able. Simple setup. <!doctype html> <style type="text/css"> body {color: white;} body :not([foo]) {background: green;} body :not(bar) {background: red;} </style> <p>This paragraph should have a green background.</div> The paragraph should have a green background since :not([foo]) has a specificity of 0:1:1 where :not(foo) should have a specificity of 0:0:1.
Attachments
Alan Gresley
Comment 1 2011-06-12 23:16:04 PDT
(In reply to comment #0) > Always reproduce-able. Simple setup. > > <!doctype html> > > <style type="text/css"> > body {color: white;} > body :not([foo]) {background: green;} > body :not(bar) {background: red;} > </style> > > <p>This paragraph should have a green background.</div> > > The paragraph should have a green background since :not([foo]) has a specificity of 0:1:1 where :not(foo) should have a specificity of 0:0:1. :not([foo]) has a specificity of 0:1:0.
Alice Boxhall
Comment 2 2011-06-15 20:59:51 PDT
This seems to work in WebKit Nightly r88920 using http://jsfiddle.net/vfWFN/ Could you confirm whether this is still an issue for you in WebKit Nightly?
Alan Gresley
Comment 3 2011-06-16 01:47:06 PDT
(In reply to comment #2) > This seems to work in WebKit Nightly r88920 using http://jsfiddle.net/vfWFN/ > > Could you confirm whether this is still an issue for you in WebKit Nightly? I can confirm that the issue with specificity has be fixed. Thank you.
Note You need to log in before you can comment on or make changes to this bug.