Skip to content
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

Stacking order + 'z-index' spec #4965

Open
14 tasks
fantasai opened this issue Apr 16, 2020 · 8 comments
Open
14 tasks

Stacking order + 'z-index' spec #4965

fantasai opened this issue Apr 16, 2020 · 8 comments

Comments

@fantasai
Copy link
Collaborator

fantasai commented Apr 16, 2020

Filing this issue to track that we need a stacking/painting order spec. Topics should include (note this list has been edited substantially since the issue was initially filed):

(Feel free to edit this description to add more tracking items, or comment below and I'll edit if you don't have permissions.)

fantasai added a commit that referenced this issue Apr 16, 2020
…o its own spec. (Currently active definition is in CSS2.) #4965
@Loirooriol
Copy link
Contributor

CSS2 seems to assume that stacking contexts can only be established by positioned elements with non-auto z-index (and the root element).

But now we have plenty of ways for that. Like the transform and opacity listed above, but also will-change, contain, isolation, filter, perspective, etc. The new text should not make assumptions about how the stacking context was established, since other specs can introduce new ways of establishing it.

@dbaron
Copy link
Member

dbaron commented Apr 20, 2020

It should specify the resolution of #2717.

@dbaron
Copy link
Member

dbaron commented Apr 20, 2020

Also, I'd probably name the spec "CSS Painting Model" or something along those lines. And it definitely needs to define terms for the various things that can happen (mentioned in the previous 2 comments) that other specs can hook into.

JTensai pushed a commit to JTensai/csswg-drafts that referenced this issue May 13, 2020
…o its own spec. (Currently active definition is in CSS2.) w3c#4965
@BenjaminAster
Copy link

z-index is now the only CSS property that is not defined anywhere outside of the CSS2 spec, so I think creating a spec for it (or merging it into an existing one) would be a big step forward in making the CSS2 specification obsolete.

@Loirooriol
Copy link
Contributor

Painting order and stacking contexts are now in https://drafts.csswg.org/css-position-4/#painting-order, so I guess z-index could be there too.

@tabatkins
Copy link
Member

Oh yeah it should definitely live in Position.

@dbaron
Copy link
Member

dbaron commented Jul 5, 2023

For now I think that's fine, though in the long term I think we should really have a CSS painting model spec (as discussed at least once in the past).

@dbaron
Copy link
Member

dbaron commented Jul 5, 2023

I just edited the initial comment to include the other things that have been raised here, and in that other linked discussion. (The list more than doubled in length, I think.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants