- From: Zack Weinberg <zackw@panix.com>
- Date: Sat, 13 Jul 2013 16:01:04 -0400
- To: Corey Ford <cford@mozilla.com>, www-style list <www-style@w3.org>
On Fri, Jul 12, 2013 at 12:37 PM, Corey Ford <cford@mozilla.com> wrote: > > For any of 'top', 'bottom', 'left', and 'right' that are not 'auto', if the > box's normal position would cause that edge of its margin box to be less > than the specified distance within that paddingedge of its scrolling > container, the box is repositioned to that distance from the edge, such that > the box doesnot move while the container scrolls. The distance the box is > repositioned is limited such that the element's margin box never crosses the > oppositeedge of the content box of its containing block, with the effect > thatthe element starts scrolling with its container again when it reaches > the end of its containing block.(If 'top', 'bottom', 'left', and 'right' are > all 'auto', the effect will be identical to relative positioning with those > values). None of these properties affect the width or height of the element. > Percentage values of these properties reference the padding box of the > scrolling container. On a less grouchy note, what happens if you have <style> h2 { position: sticky } </style> <div> <h2>Thing One</h2> <p>... text here ... </p> <h2>Thing Two</h2> <p>... more text here ...</p> </div> and the container is scrolled such that, if not for position:sticky, the second <h2> would be occupying the screen position occupied by the first <h2>? IIRC Webkit has the second <h2> displace the first one, and that seems sensible to me. zw
Received on Saturday, 13 July 2013 20:01:25 UTC