[Webkit-unassigned] [Bug 234561] New: [:has() pseudo-class] :has() selector invalidation issue with toggling :checked

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 21 05:50:10 PST 2021


            Bug ID: 234561
           Summary: [:has() pseudo-class] :has() selector invalidation
                    issue with toggling :checked
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: kyle.bavender at me.com

A simple example:

#myform:has(input:checked) .row { background: rebeccapurple; }

Toggling of the checkbox does not toggle that background color, but it really seems that it should.

I created a test case with more details here: https://codepen.io/kbav/pen/YzrxwBa?editors=1100

This is a new bug created per request from Antti Koivisto on https://bugs.webkit.org/show_bug.cgi?id=227702 , the tracking bug for :has() implementation.

I also just noticed that Lea Verou also opened https://bugs.webkit.org/show_bug.cgi?id=234556 , which seems related, though in my test case, the :has() styling _does_ work at startup for identifying an <input type="checkbox" checked /> is :checked — it just does not correctly identify the toggling of the checkbox and invalidate the style.

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/20211221/f339cc91/attachment-0001.htm>

More information about the webkit-unassigned mailing list