Re: [w3ctag/design-reviews] The Popup API (Issue #743)

> Once you can control "top layered ness" as a CSS property, the use cases that prevent this from being an element are easily dealt with.

The nice thing about JS controlling the top layer is that it can enforce restrictions that allow the painting order to be somewhat sensical whereas with a CSS property, you can't really do so. As it stands, what can push to top layer is `requestFullscreen()` and `dialog.showModal()`, and the painting order is enforced by the ordering of the calls (not the ordering of the elements in the DOM!), which works out quite nicely! And there are restrictions to prevent weird edge cases, for instance, you can't fullscreen a `<dialog>` element.

I would oppose allowing CSS to move things into the top layer, because you allow such a mechanism, the stacking nature of the top layer no longer works out (which position do we use for a CSS-top layer element in the stack?), and problems similar to z-index arise again. 

I think for popover you also need a JS call (`showPopover`) in order to push to the top layer, which works out great I think, but yeah I would definitely be concerned if just using the `popover` attribute added it to the top layer.




-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/743#issuecomment-1314204961
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/743/1314204961@github.com>

Received on Monday, 14 November 2022 18:34:05 UTC