W3C home > Mailing lists > Public > www-style@w3.org > December 2009

Re: Proposal: Fixed Table Headers in CSS

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 15 Dec 2009 16:16:24 -0800
Message-Id: <37DAC0EF-95B5-47E6-8424-422025F45B09@gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Doug Schepers <schepers@w3.org>, "Eric A. Meyer" <eric@meyerweb.com>, Mikko Rantalainen <mikko.rantalainen@peda.net>, www-style CSS <www-style@w3.org>

On Dec 15, 2009, at 2:27 PM, "Tab Atkins Jr." <jackalmage@gmail.com>  

> On Tue, Dec 15, 2009 at 4:17 PM, Brad Kemper <brad.kemper@gmail.com>  
> wrote:
>> I see what you mean now about accumulating. You don't want the H2  
>> to push
>> the h1 in it's grandparent off, right? But I don't see how you  
>> prevent that
>> if the 'top' of the H2 is relative to the offscreen top of the  
>> section.
> The two values are relative to the same edge, *but* in my conception
> sticky elements somehow never overlap, just like floats.

Mine too, but does so by pushing previous sticky elements in the same  
direction out of the way, which would also include the H1. Maybe there  
is some way around that which I haven't thought of, for when you want  
two levels of sticky elements inside each other.

> How this
> works, precisely, when you're mixing top-sticky and left-sticky
> elements, frex, is up in the air.

Yeah that's kind of tricky. I think usually if you had column-scoped  
THs on the left, and row-scoped THs in a THEAD along the top, you'd  
want to allow the horizontal and vertical to be able to overlap each  
other, with the side headers sliding under the THEAD when scrolling  
vertically. The stacking context of the first-in (THEAD) should be  
higher than later stickies, which is reverse of normal, but it looks  
better that way and seems neccesary. It's hard for me to imagine  

>> You
>> could do something like the following to prevent the H1 from being  
>> pushed
>> off:
>> h1 { position: sticky; top: 0; }
>> h2 { position: sticky; top: 2am; }
> Nah, that doesn't work well.  If you have another <h1> further down,
> it would (1) overlap the current sticky <h2> temporarily before it
> displaced the <h1>,

Naw, it would push the first h2 up (no overlaps allowed), which would  
then push the h1 up... which is also not what you want.

> and (2) display the last <h2> of the previous
> section until a following <h2> displaced it. (Well, it would do so in
> the first example.  The second example would work properly, assuming
> that the <h1> was 2em tall.)
> I'm also not certain how your idea of this working actually causes
> things to be displaced.  The way you're stating it it seems like later
> sticky things just overlap previous ones, hiding them behind.

No, as soon as it would overlap it pushes the previous one out of the  
way instead. (Well "previous" if it is top-or left- sticky, and  
subsequent one if bottom- or right-sticky.) 
Received on Wednesday, 16 December 2009 00:17:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:41 UTC