[csswg-drafts] The values of ScrollTop and ScrollLeft have been made implementation-defined, the spec needs to standard-define them.

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

== The values of ScrollTop and ScrollLeft have been made implementation-defined, the spec needs to standard-define them. ==
https://drafts.csswg.org/cssom-view/#scrolling-area-origin says:

> The **origin of a scrolling area** is the origin of the initial containing block if the scrolling area is a viewport, and otherwise the top left padding edge of the element **when the element has its default scroll position**.

Although almost all the browsers have interoperably implememnted the default scroll position in the same way(E.g. Topleft side for horizontal-tb, ltr, Topright side for vertical-rl, ltr, Topbottom side for vertical-rl, rtl). But the origin of a scrolling area are still **theoretically** implementation-defined.

Then about `ScrollTop` and `ScrollLeft`, the spec says at https://drafts.csswg.org/cssom-view/#dom-element-scrollTop:

> Return the y-coordinate of the scrolling area at the alignment point with the top of the padding edge of the element.

> Return the x-coordinate of the scrolling area at the alignment point with the left of the padding edge of the element.

So the values of `ScrollTop` and `ScrollLeft` depend on the origin of a scrolling area, which then depends on the implementation of the user agent, which effectively makes the values of `ScrollTop` and `ScrollLeft` implementation-defined.

So I think the spec needs to standard-define them. I personally suggest the spec be explicit for every combination of `writing-mode` and `direction` about what the origin of a scrolling area is.

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

Received on Friday, 25 May 2018 07:32:14 UTC