w3c / w3c/csswg-drafts

[CSS2] define and use a term for things that create a stacking context

Open
#3,102 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

CSS2 Needs Edits Needs Naming (Request to Bikeshed)
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

This is a subtask of #2717 covering only the edits to CSS2, and not the edits that will be needed to other specs to depend on the edits to CSS2.

Per working group discussion today, we want to add a term to CSS2 for things that create a stacking context. We then want to rewrite relevant parts of the spec (for example, some but probably not all of the references to "positioned descendants" in Appendix E) to use this term, so that when other CSS specs add to the term, they will be referenced appropriately.

Some of these edits require some care. For example, bullet point 8 of Appendix E currently begins:

All positioned descendants with 'z-index: auto' or 'z-index: 0'

and this is interesting because:

  • of these conditions, having z-index: 0 (when z-index applies, i.e., when positioned) establishes a stacking context but z-index: auto does not
  • z-index only applies to things that are actually positioned, and not to the other things that establish a stacking context
  • everything else that establishes a stacking context should be considered here, unless it's also positioned and has a z-index other than auto or 0 which moves it to bullet point 3 or 9.

so the revised wording needs to account for all of this.

I suspect an appropriate place for the definition may be in 9. Layered presentation (maybe or maybe not in the existing 9.9.1 subsection). I suspect that section will also require edits. Some other sections may as well.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in CSS2 section 9, “Layered presentation,” and Appendix E at drafts.csswg.org/css2/zindex.html. Review the existing stacking-context and “positioned descendants” wording, then identify all relevant references that need the new term. Done means CSS2 defines the term and its Appendix E and related references consistently account for stacking contexts.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.