Re: [csswg-drafts] [selectors] Add :modal-dialog pseudo-class (#6965)

So there's something *somewhat* magical about the top layer. It provides a guaranteed-on-top paint order, regardless of `max(z-index)` on the page. And as such, it gets some special attention from the UA to make sure it's being managed for the user. For example, both fullscreen and `<dialog>` have explicit provisions for the UA taking action to close the fullscreen/dialog for the user. (For fullscreen [here](https://fullscreen.spec.whatwg.org/#:~:text=whenever%20the%20user%20agent%20deems%20it%20necessary), and dialog [here](https://html.spec.whatwg.org/multipage/interactive-elements.html#:~:text=user%20agents%20may%20provide%20a%20user%20interface%20that%2C%20upon%20activation).) In either of those cases, that works because they're both controlled via JS. However, if you provide access to the top layer via a CSS property, similar concerns will exist: the UA will need the power to remove those elements from the top layer in some cases, even if a `position:top-layer` CSS rule still matches the element. And when that happens, how do things work? See the [questions here](https://github.com/w3c/csswg-drafts/issues/6965#issuecomment-1017578477).

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


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

Received on Friday, 21 January 2022 22:26:41 UTC