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: | CSS | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alan Gresley
(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
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
(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.