-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Expose a stack of Top Layer elements #2525
Comments
@domenic how is this a dupe of #897? <style>
.backdrop {
position: fixed;
top: 0; bottom: 0;
left: 0; right: 0;
z-index: 1;
background-color: rgba(0, 0, 0, 0.5);
}
.overlay {
position: fixed;
z-index: 2;
}
</style>
<div class="backdrop"></div>
<!-- this creates a new stacking context -->
<div style="transform: translateZ(0);">
<div class="overlay">
<button>click me!</button>
</div>
</div> ^ you cannot click the button in |
I'm confused now. Are you talking about top layer (the subject of #897) or stacking contexts? They are completely different and unrelated things. |
For the way I see it, being in the Top Layer has two perks:
#897 addresses only 1), right? |
No, #897 is about putting things in the top layer, period. It's not about some kind of half-top-layer feature, it's about the actual top layer. |
Good to know, thanks for clarifying 👍 |
Yep, that's the "modulo #2341" part. |
Building custom overlays is hard, especially because of how stacking context works - more context here https://github.com/PolymerLabs/iron-overlay#the-problem
Delegating to the end user the responsibility of declaring overlays in a stacking-context-safe parent node is not viable for Custom Elements authors and users, as they would have to trade encapsulation to solve this issue.
We need an API to explain the magic of the
<dialog>
, specifically why it is not affected by the stacking context trap.Proposed solutions:
position: top-layer
@alice @domenic WDYT?
The text was updated successfully, but these errors were encountered: