Re: [csswg-drafts] [css-ui] select:hover and select:active styles (#11185)

I was tempted to suggest a rewording like:

> An element E also matches [:hover](https://drafts.csswg.org/selectors/#hover-pseudo) if one of its descendants D in the [flat tree](https://drafts.csswg.org/css-scoping-1/#flat-tree) (including non-element nodes, such as text nodes) matches the above conditions, and both D and E are [in the same top layer](https://drafts.csswg.org/css-position-4/#in-the-same-top-layer).

to fix both the case where the descendant itself is an element in the top layer, and the case where the element is in the top layer but the descendant is nested within *another* element in the top layer... but then I realized that it's still not right because the "top layer root" of an element is an ancestor of that element, not an ancestor-or-self.  (Though maybe that's a mistake?)  Also, the definitions (unnecessarily) apply only to elements and not to nodes.

so instead, how about a rewording as:

> An element E also matches [:hover](https://drafts.csswg.org/selectors/#hover-pseudo) if one of its descendants D in the [flat tree](https://drafts.csswg.org/css-scoping-1/#flat-tree) (including non-element nodes, such as text nodes) matches the above conditions, and neither D, nor any of its flat tree ancestors that are flat tree descendants of E, is in the [top layer](https://drafts.csswg.org/css-position-4/#document-top-layer).

-- 
GitHub Notification of comment by dbaron
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11185#issuecomment-2537590091 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 12 December 2024 02:04:57 UTC