Closed Bug 1796954 Opened 2 years ago Closed 2 years ago

css support for has() selector is producing unexpected results

Categories

(Core :: CSS Parsing and Computation, defect)

Firefox 107
defect

Tracking

()

RESOLVED DUPLICATE of bug 1793012

People

(Reporter: jmeurer986, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0

Steps to reproduce:

am working on refactoring the UI of a legacy application. I implemented the has() selector in my css and in firefox the selector is matching elements that should not be matched.

Actual results:

The css style is being applied to elements that don't actually match the criteria in the rule

Expected results:

only elements that match the rule criteria should receive the style. In the screenshot the same page in my app is shown on the left in firefox and on the right in Chrome. The page should be styled as it is in Chrome.

Please attach a minimal testcase to the bug.

Component: Untriaged → CSS Parsing and Computation
Flags: needinfo?(jmeurer986)
Product: Firefox → Core
See Also: → 1793012

This is not unexpected, that's why it's disabled by default. We don't invalidate :has() yet and style sharing is broken.

Sounds like this is approximately bug 1793012 then.

(If it's not too much trouble to share an affected URL or a minimized testcase to demonstrate the issue you're hitting, that may end up being handy to validate that this is indeed fixed once bug 1793012 and other associated work is fixed. No worries if that's not easy to provide, though; per comment 2, it sounds like the deficiencies here are reasonably well-understood.)

Severity: -- → S3
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1793012
Flags: needinfo?(jmeurer986)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: