-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ::top-layer pseudo element #10963
Comments
Having it be a pseudo-element with children seems a little more complex than needed, I think? I think we can get the same functionality with a pseudo-class that matches elements in the top-layer list. We can make it functional as well, taking an an+b argument selecting based on top-layer index. That is, Am I missing something that makes this not work? |
I think that the benefit of going with a pseudo-element would be that it automatically enables the use of any existing 'state' CSS selector ( For example, this should automatically work if /* Style popovers if a dialog is also present */
::top-layer:has( dialog ) [popover] {
...
} |
The discussion in #7319 started with the suggestion to add
|
@bramus Given https://nerdy.dev/have-a-dialog, if we want to style the I'm thinking of web component design systems that would benefit from this CSS ability. |
This is a continuation of #7319.
I request that a
::top-layer
pseudo element is added. As Bramus proposed:I've created a codepen that demonstrates a use case for being able select the top-most
<dialog />
and prevent 'stacking' of multiple::backdrop
s:https://codepen.io/rejh/pen/LYKPvNr
Thank you!
Edit: CC @bramus
The text was updated successfully, but these errors were encountered: