`:not` with type and class causes CSS rule to be discarded
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
People
(Reporter: jake, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0
Steps to reproduce:
:not(div.some-class),
body {
color: green
}
<p>Hello World.</p>
Actual results:
Text is default black.
"Ruleset ignored due to bad selector" is seen in the console log.
Expected results:
Text should be green. No error should be reported in the console log (this is a valid selector).
Does not matter if the CSS is via a style
element or separate CSS resource.
Without both type and class, the problem is not seen (i.e. with just :not(div), body
or :not(.some-class), body
as the selector it works as expected).
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Bugbug is wrong. Please revert the change. This is a bug with Firefox CSS parsing.
Updated•5 years ago
|
Comment 3•5 years ago
|
||
This was how it was specified back in the day. Bug 933562 updated Firefox to the new spec.
Description
•