Skip to content

[css-position-3] Single auto value of offset properties for absolutely positioned elements should not compute to zero #5327

Open
@vwkd

Description

The spec reads for absolutely positioned elements

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

This would imply, that if the size in the same axis is not specified (i.e. auto), then the element would be resized, since now both sides are set to non-auto values.

For example, with the current spec I'd expect the following box to be full width instead of max-content wide. In other words, it would be equivalent to having uncommented the line right: 0.

<div class="abs">Hello World</div>
.abs {
  position: absolute;
  background-color: lightgrey;
  left: 0;
  /* right: 0; */
}

Since this is not the case, I suppose this is a bug in the spec.

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