div#green-child

The offsetTop definition provided by CSSOM View module, section 7 is:

3. Return the result of subtracting the y-coordinate of the top padding edge of the first CSS layout box associated with the offsetParent of the element from the y-coordinate of the top border edge of the first CSS layout box associated with the element, relative to the initial containing block origin, ignoring any transforms that apply to the element and its ancestors.

document.getElementById("green-child").offsetParent:

document.getElementById("green-child").offsetTop:

document.getElementById("parent").scrollTop:

Back to csswg-drafts' Issue 1832