[csswg-drafts] [cssom][css-position] getComputedStyle() does not produce 'auto' for inset properties in static positioning if another value was specified

Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom][css-position] getComputedStyle() does not produce 'auto' for inset properties in static positioning if another value was specified ==
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:

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

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

Either CSSOM or CSS Position is wrong.




Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3099 using your GitHub account

Received on Tuesday, 11 September 2018 21:14:38 UTC