Skip to content

[css-color-4] Paint order of non-positioned stacking context #3793

Closed
@SimonSapin

Description

@SimonSapin

CSS Color Level 3 defines:

https://drafts.csswg.org/css-color-3/#transparency

If an element with opacity less than 1 is not positioned, then it is painted on the same layer, within its parent stacking context, as positioned elements with stack level 0.

However this sentence was apparently removed from Level 4: https://drafts.csswg.org/css-color/#transparency

I think this removal is a bug and that definition is necessary, because CSS 2 appendix E is written with the assumption that elements that create a stacking context are all positioned. (This is because only the z-index property creates a stacking context in CSS 2, and it only applies to positioned elements.)

css-transforms has an alternative wording that also works:

https://drafts.csswg.org/css-transforms-1/#transform-rendering

For elements whose layout is governed by the CSS box model, any value other than none for the transform property results in the creation of a stacking context. Implementations must paint the layer it creates, within its parent stacking context, at the same stacking order that would be used if it were a positioned element with z-index: 0.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions