Closed Bug 1680933 Opened 5 years ago Closed 5 years ago

`:not` with type and class causes CSS rule to be discarded

Categories

(Core :: CSS Parsing and Computation, defect)

Firefox 83
defect

Tracking

()

RESOLVED DUPLICATE of bug 933562

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).

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Inspector: Rules
Product: Firefox → DevTools

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.

Component: Inspector: Rules → CSS Parsing and Computation
Product: DevTools → Core

This was how it was specified back in the day. Bug 933562 updated Firefox to the new spec.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.