Skip to content

[css2] Reconcile inline stacking-context decoration painting order with CSS Position 4 #14942

Backlog

Description

@thejohnjansen

Follow-up to #13998, per the CSSWG resolution of 2 December 2026:

RESOLVED: Accept the changed behavior in CSS Position (no change in Position, yes change in CSS2)

The discussion also recorded:

ACTION: JohnJansen to log an issue against CSS2

I used Chat-GPT 6 Sol to assist with creating this issue.

Inconsistency

CSS2's layered presentation / painting-order description says that the first layer painted within each stacking context is:

the background and borders of the element forming the stacking context.

However, CSS Positioned Layout Level 4's stacking-context painting algorithm distinguishes block-level and inline-level boxes. For an inline-level box establishing a stacking context, its decorations are painted during the inline painting step, after non-positioned floating descendants, rather than unconditionally behind all of the stacking context's contents.

The testcase and implementation comparison are in #13998. The working group resolved to retain the CSS Position 4 behavior rather than change it to match CSS2.

Requested change

Reconcile CSS2's conflicting stacking-context painting-order text with that resolution. Update the affected text, or explicitly mark it as superseded and refer readers to CSS Position 4, so CSS2 no longer specifies a contradictory ordering for the decorations of an inline box establishing a stacking context. Check the related detailed painting-order text in Appendix E for consistency as part of this edit.

No change to the CSS Position 4 algorithm is requested.

Related testing

This part is AI generated.

The discussion separately recorded an action to test that z-index continues to shift all descendants appropriately: descendants (including floats) of a relatively positioned inline with z-index: 12 must paint above an overlapping z-index: 11 sibling in the same parent stacking context. That testing action is distinct from this CSS2 specification follow-up.

Activity

  1. astearns commented on Dec 3, 2026

    @astearns
    Member

    My personal preference would be to mark it as superseded with a link to Position 4. That means less places to make edits for any future changes we need to make.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions