[csswg-drafts] [css3-positioning] [cssom] getComputedStyle should return "auto" for position:sticky if applicable

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

== [css3-positioning] [cssom] getComputedStyle should return "auto" for position:sticky if applicable ==
Spec section: 
https://www.w3.org/TR/css-position-3/#sticky-pos
https://drafts.csswg.org/cssom/#resolved-values

According to the spec, top/bottom/left/right on getComputedStyle are used values for backwards compatibility with sites relying on the old definition of computed style. However, position offsets have special meaning for position sticky. getComputedStyle should return "auto" for the following element: <div style='position:sticky; top: auto;'></div> instead of returning "0px" which is hugely misleading.

Currently, both Firefox 53, Safari 10 return "auto" in this case. Chrome 58 returns "0px" based on the spec but is about to change to "auto" soon.

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

Received on Wednesday, 10 May 2017 14:55:21 UTC