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

Agenda+ to discuss exempting top layer elements from `:hover`'s and `:active`'s "descendants in the flat tree" clause.

The current [spec for :hover](https://drafts.csswg.org/selectors/#hover-pseudo) says:

> An element also matches [:hover](https://drafts.csswg.org/selectors/#hover-pseudo) if one of its descendants 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.

The [spec for :active](https://drafts.csswg.org/selectors/#active-pseudo) says:

> An element also matches [:active](https://drafts.csswg.org/selectors/#active-pseudo) if one of its descendants 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.

I propose, for both, to change to:

>  ...if one of its descendants 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, as long as the element and its descendant have the same ancestor element within the [top layer](https://drafts.csswg.org/css-position-4/#document-top-layer), or neither the element nor its descendant are descendants of any element in the [top layer](https://drafts.csswg.org/css-position-4/#document-top-layer).

...or similar.

-- 
GitHub Notification of comment by mfreed7
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11185#issuecomment-2537525261 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 01:08:42 UTC