Re: [csswg-drafts] Add ::top-layer pseudo element (#10963)

I think that the benefit of going with a pseudo-element would be that it automatically enables the use any existing CSS selector (`:nth-child`, `:has`, etc) instead of having to implement that for the pseudo-class?

For example, this should automatically work if `::top-layer` would be a pseudo-element:

```css
/* Style popovers if a dialog is also present */
::top-layer:has( dialog ) [popover] {
  ...
}
```

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


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

Received on Saturday, 28 September 2024 05:59:42 UTC