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

I don't think it's ok to have CSS put something in the top layer. The top layer is a stacking context that is managed by the UA, and enables it to implement features such as fullscreen and dialog reliably on behalf of the user *and* developer. If the developer were able to put things into the top layer that the UA did not understand, the UA would lose its ability to reliably implement the features it does have for the top layer, because it wouldn't be sure that the fullscreen or dialog was on top of other content.

> I'm not sure the UA would "need the power to remove those elements from the top layer".

I think it does. I don't think the top layer should be considered just a developer convenience. The developer already has convenience via the other stacking contexts.

> If an author adds a `position: fixed` element as a direct child of the root, with a very high `z-index`, then it kind of behaves like in the top layer, and is painted on top of other contents. The UA offers no way to remove that element, and it's fine.

Yes, but that's not the top layer. That's the "developer layer".



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


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

Received on Tuesday, 25 January 2022 00:57:30 UTC