W3C home > Mailing lists > Public > www-style@w3.org > July 2013

Re: specifying position:sticky

From: Robert O'Callahan <robert@ocallahan.org>
Date: Fri, 12 Jul 2013 20:25:03 -0700
Message-ID: <CAOp6jLb6jzSa6UKE+LoYmbzV2fY_akMyPdjjTHdepD65GvTROw@mail.gmail.com>
To: Corey Ford <cford@mozilla.com>
Cc: www-style <www-style@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:32 UTC