Skip to content

[css-position] computed value of inset properties should not be auto in static positioning if another value was specified #3099

@Loirooriol

Description

@Loirooriol

According to https://drafts.csswg.org/cssom/#resolved-value-special-case-property-like-top

If the property applies to a positioned element [...]. Otherwise the resolved value is the computed value.

An element with position: static is not positioned, so the resolved value is the computed value.

According to https://drafts.csswg.org/css-position-3/#box-offsets-trbl,

Computed value: For position: static, auto.

So I would expect this:

element.style.top = "10px";
getComputedStyle(element).top; // "auto"

However, all Firefox, Chromium and WebKit return "10px" instead.

Either CSSOM or CSS Position is wrong.

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