[Webkit-unassigned] [Bug 234732] New: [:has() pseudo-class] Styles matching non-matching elements on load

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 28 14:32:44 PST 2021


            Bug ID: 234732
           Summary: [:has() pseudo-class] Styles matching non-matching
                    elements on load
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Mac (Intel)
                OS: macOS 11
            Status: NEW
          Severity: Critical
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: brandon at dreamthinkbuild.com

Created attachment 448057

  --> https://bugs.webkit.org/attachment.cgi?id=448057&action=review

screenshot of has pseudo-class bug

Congrats on launching the :has() pseudo-class! Excited by all the possibilities this will open for styling.

One unexpected side effect I'm seeing when testing— it appears that `:has()` sometimes matches for non-matching elements. The inspector doesn't show the styles but they appear on-page. If I comment out the styles in the inspector and then un-comment them, they disappear.

 * Example URL: https://codepen.io/brandonmcconnell/pen/45b67ffa16dc41614efdd140bef1f439
 * Example screenshot attached
 * Example screen recording: https://www.loom.com/share/0cf9c18a99a8421f9957ff04c34f64de

This bug is critical to the use of `:has()` so this should be resolved before the `:has()` pseudo-class is released into the production browser.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211228/8b5afcbc/attachment.htm>

More information about the webkit-unassigned mailing list