-
Notifications
You must be signed in to change notification settings - Fork 23k
Description
MDN URL
https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Positioned_layout/Stacking_context
What specific section or headline is this issue about?
Nested stacking contexts
What information was incorrect, unhelpful, or incomplete?
In this paragraph:
Every container element has an
opacityof less than1and apositionof eitherrelativeorabsoluteset. These property-value pairs create a stacking context when the element hasz-indexvalue other thanauto.
The second sentence implies that "opacity of less than 1" and "position of either relative or absolute" both create a stacking context when z-index set to other value than auto. But opacity with less than 1 is enough on its own to create one. It doesn't create a context when z-index is set, it alone already creates one.
What did you expect to see?
Something more on the lines of: "Every container element has an opacity of less than 1 and a position of either relative or absolute set along with z-index value other than auto. Both the change in opacity and the position and z-index pair create stacking contexts."
Do you have any supporting links, references, or citations?
A stacking context is formed, anywhere in the document, by any element in the following scenarios:
[...]
Element with a position value absolute or relative and z-index value other than auto.
[...]
Element with an opacity value less than 1.
Do you have anything more you want to share?
This relates to #42296 and #42299.
MDN metadata
Page report details
- Folder:
en-us/web/css/guides/positioned_layout/stacking_context - MDN URL: https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Positioned_layout/Stacking_context
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/css/guides/positioned_layout/stacking_context/index.md
- Last commit: 1dbba9f
- Document last modified: 2025-12-05T16:09:35.000Z