W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2017

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

From: yi-gu via GitHub <sysbot+gh@w3.org>
Date: Wed, 10 May 2017 14:54:45 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-227708172-1494428084-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:12 UTC