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

Hierarchy of the example is not ordered correctly? or suppose to be not ordered? #18817

Closed
angelayanpan opened this issue Jul 26, 2022 · 4 comments
Labels
Content:CSS Cascading Style Sheets docs help wanted If you know something about this topic, we would love your help!

Comments

@angelayanpan
Copy link

angelayanpan commented Jul 26, 2022

MDN URL

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context

What specific section or headline is this issue about?

The stacking context

What information was incorrect, unhelpful, or incomplete?

Reading below bullet points:

The hierarchy of stacking contexts is organized as follows:

Root
DIV #1
DIV #2
DIV #3
DIV #4
DIV #5
DIV #6

and then reading the later part:

In our example (sorted according to the final rendering order):
Root
DIV #2 - z-index is 2
DIV #3 - z-index is 4
DIV #5 - z-index is 1, stacked under an element with a z-index of 4, which results in a rendering order of 4.1
DIV #6 - z-index is 3, stacked under an element with a z-index of 4, which results in a rendering order of 4.3
DIV #4 - z-index is 6, stacked under an element with a z-index of 4, which results in a rendering order of 4.6
DIV #1 - z-index is 5

So if both of these are correct, then "hierarchy" and the "rendering order" are 2 different concepts?
I'm able to understand why the "rendering order" are the way they are.
I'm guessing in the "hierarchy" part, the order is not significant. but it's not clearly stated. maybe it needs to clearly state (not ordered in any way)?

What did you expect to see?

The "hierarchy" of the example is confusing.

  1. if we render them in a flat way, not bullet point, it can convey they are not ordered.

  2. or it needs to specify: "elements of each hierarchy is not ordered"?

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jul 26, 2022
@sideshowbarker sideshowbarker added help wanted If you know something about this topic, we would love your help! and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jul 27, 2022
@ghost
Copy link

ghost commented Jul 29, 2022

I take this issue.

@angelayanpan
Copy link
Author

thanks!

I was reading the issue again. just want to point out the main confusion was .... I read the first bullet points, I was like "why is Div3 not ordered in between 1 and 2?"
I wondered about that for a while. then I read more further down the page, and then I saw the second list.

@ghost
Copy link

ghost commented Jul 29, 2022

This is actually a good point because I had forgotten about the difference between hierarchy and rendering order.

@Josh-Cena
Copy link
Member

Fixed by #18989

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs help wanted If you know something about this topic, we would love your help!
Projects
None yet
Development

No branches or pull requests

3 participants