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

> I'd like to object to that.

Ok, thanks for the comment!

> It's just generally strange to have properties affect selector matching directly, and a lot of questions to resolve around it (querySelector/matches/etc.).

Can you clarify the questions? It seems to me like `querySelector()` and `matches()` just match in exactly the same way that a stylesheet selector would match.

> Also, circularity is also directly an issue:
> 
> ```
> :hover > foo {
>     stop-propagation: hover;
> }
> ```

This was discussed last time we talked about this issue live in CSSWG. The same issues are present for `:hover` already. E.g.

```
:hover {
  top:1000px;
}
```

Though admittedly this is a bit different. But the point is that things like `:hover` and `:active` already have problems like this.


> I'd be more in favor in what Emilio proposed of applying this behavior automatically for top layer elements, given they somewhat behave like detached elements from the DOM in some sense. It would also solve for other popover/modal/fullscreen, where preventing this propagation sounds desirable.
> 
> I also don't think it necessarily blocks from such extension from being added in the future if someone comes back with a more solid proposal.

I'm ok with this also, it just feels less flexible. But it does solve the OP use case. And it nicely doesn't have the circularity problem you raised.



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


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

Received on Tuesday, 21 January 2025 23:49:57 UTC