-
Notifications
You must be signed in to change notification settings - Fork 680
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
[css-position-4] Define "top layer" positioning scheme #4998
Comments
See also whatwg/fullscreen#165 |
With fullscreen, dialog, (the experimental) page transitions, (the upcoming) In addition to defining the top layer concept, I see related these discussions/requests:
Also see part of the discussion in #6965 that talked about a |
This issue is not tracking allowing authors to select the top layer with CSS (I don't think that's a good idea; see discussion in issue #6965). It's about moving the style sheet rules from the fullscreen spec, and the description of how the boxes for the top-layer content is reparented, over to a CSS spec. |
Yes, was mentioning the other/related items in order to paint the bigger picture, independent of their outcome. |
Regarding the prior discussions, it sounds to me like there's actually a need for multiple (UA) top layers. A definition for allowing elements to be placed in the top layer might have these requirements:
With this, the often mentioned use case of having a tooltip within a dialog within a fullscreen element could be covered. Each of them would be placed in its own top layer. In case the rules above are unclear, here are some examples which hopefully make it easier to understand the concept: Simple case: <a>
<top-layer/> <!-- Will be in the top layer (above <c/>) -->
<b>
<c/>
</b>
</a> Two elements in top layer: <a>
<top-layer/>
<b>
<c/>
</b>
<top-layer/> <!-- Will be in the top layer (above <c/> and <d/>) because it's later in the DOM tree than the other <top-layer/> -->
<d/>
</a> Nested elements in top layer: <a>
<top-layer> <!-- Will be put in the top layer (above <e/>) -->
<b>
<top-layer> <!-- Will be in the top layer above the outer <top-layer/> (and <c/>) -->
<c/>
</b>
</top-layer>
<d>
<e/>
</d>
</a> Note: While this is meant to define UA-controlled top layers, it could easily be extended to include author-defined top layers. The only additional rule would be that UA top layers are always above authored ones in their relative context. Sebastian |
I just wanted to call out the Popup API Proposal, which is being incubated in the OpenUI WG. We've been thinking about these issues and many more, and we're working on a proposal, and prototype in Chromium, to support these use cases. There has been significant discussion. There are many nuances involved in creating the types of UI that use a "top layer" concept, so we'd really love your feedback on the proposal. For example, a dedicated The hope is to bring the Popup API to a WHATWG PR fairly soon. There are some CSSWG pieces, such as the I think this issue might need a bit of clarification. One interpretation is that it is about adding a CSS primitive to move elements into and out of the top layer. (Hopefully not.) The other interpretation is that the descriptions about how the top layer works should be augmented and moved into CSS specs. |
The top layer has been added to the CSS spec, and this patch moves the top layer references from the fullscreen spec to the CSS spec and uses new algorithms to add and remove from the top layer defined in the CSS spec. Moving the top layer to the CSS spec has been discussed in these issues: w3c/csswg-drafts#4998 w3c/csswg-drafts#6939 w3c/csswg-drafts#7845 w3c/csswg-drafts#8240
This is now more or less done, in CSS Position 4. I based the behavior on Rune's suggested outline. This differs slightly from the simpler model described in the Fullscreen spec. Notably:
|
This change moves the top layer references from Fullscreen to CSS and uses the new algorithms to add and remove from the top layer. Moving the top layer concept to CSS has been discussed in these issues: * w3c/csswg-drafts#4998 * w3c/csswg-drafts#6939 * w3c/csswg-drafts#7845 * w3c/csswg-drafts#8240 Tests: web-platform-tests/wpt#39828.
This change moves the top layer references from Fullscreen to CSS and uses the new algorithms to add and remove from the top layer. Moving the top layer concept to CSS has been discussed in these issues: * w3c/csswg-drafts#4998 * w3c/csswg-drafts#6939 * w3c/csswg-drafts#7845 * w3c/csswg-drafts#8240 Tests: web-platform-tests/wpt#39828.
This change moves the top layer references from Fullscreen to CSS and uses the new algorithms to add and remove from the top layer. Moving the top layer concept to CSS has been discussed in these issues: * w3c/csswg-drafts#4998 * w3c/csswg-drafts#6939 * w3c/csswg-drafts#7845 * w3c/csswg-drafts#8240 Tests: web-platform-tests/wpt#39828.
The Fullscreen API spec describes a rendering model which does not map directly to CSS. It's been suggested that we make add the necessary CSS primitives.
https://fullscreen.spec.whatwg.org/#rendering
The text was updated successfully, but these errors were encountered: