Re: specifying position:sticky

On Fri, Jul 12, 2013 at 4:48 PM, Corey Ford <cford@mozilla.com> wrote:

> On 7/12/13 9:37 AM, Corey Ford 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.
>>
> For sticky elements that generate multiple boxes, there are several
> options for what exactly to keep contained inside the containing block /
> viewport. WebKit appears to keep the farthest edges in each direction
> contained, which seems sensible (similar to how the containing block for
> position:center is established in the current css3-positioning draft).


That sounds good, but there is one remaining issue: when the containing
block element of the position:sticky element itself has broken into
multiple boxes. E.g.
<div style="column-height:100px">
  <div id="containing-block">
    <div style="position:sticky; height:200px"></div>
I'm not sure what you should do there. I don't remember whether we decided
to define "containing block" to denote an element or a particular box.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*

Received on Saturday, 13 July 2013 03:25:31 UTC