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

@bramus Given https://nerdy.dev/have-a-dialog, if we want to style the `<body>` that way when a modal dialog is open, but the `<dialog>` is in (nested) shadow DOM, having the ability to do `body:has(::top-layer dialog) { scale: 0.8 }` etc would be awesome. Otherwise you'd have to use JS to add a class on the body when a dialog is open.

I'm thinking of web component design systems that would benefit from this CSS ability.

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


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

Received on Thursday, 14 November 2024 17:57:04 UTC