Skip to content

[css-position-3] Section 3.5.1 Conflicts with CSS2 Positioning Behavior #11258

@gitspeaks

Description

@gitspeaks

The rule in Section 3.5.1 states:

If only one inset property in a given axis is auto, it is set to zero.

This implies that when one inset property (e.g., left or right) is auto and the other is not, the auto value is replaced with 0. Consequently, both inset properties on that axis are treated as having non-auto values, with one being explicitly set to zero.

However, the CSS2 specification defines several rules that depend on scenarios where one inset property is auto and the other is not. For example, from CSS 2, Section 10.3.7:

Case 1: left and width are auto, and right is not auto; then the width is shrink-to-fit, and solve for left.
Case 3: width and right are auto, and left is not auto; then the width is shrink-to-fit, and solve for right.
Case 4: left is auto, and width and right are not auto; then solve for left.

By automatically setting an auto inset to zero when the other inset on the same axis is non-auto, the CSS Positioned Layout Module Level 3 invalidates these cases from CSS2 and would result in a different positioning behavior according to other CSS2 absolute position specification.

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