W3C home > Mailing lists > Public > www-style@w3.org > August 2011

Re: Fixed-in-parent

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 08 Aug 2011 23:29:22 -0700
Message-ID: <4E40D3C2.9040103@inkedblade.net>
To: www-style@w3.org
On 08/08/2011 10:24 PM, Tab Atkins Jr. wrote:
> On Mon, Aug 8, 2011 at 8:40 PM, Jonas Sicking<jonas@sicking.cc>  wrote:
>> Hi all,
>>
>> There's a layout pattern I'm starting to see on more an more web pages
>> (and in some UI) that CSS is currently lacking support for, but that I
>> think would be nice to add.
>>
>> One example is:
>> http://www.yelp.com/search?find_desc=sushi&ns=1&rpp=10&find_loc=San+Francisco%2C+CA
>
> Yup, this is a really useful pattern.

See also
   http://lists.w3.org/Archives/Public/www-style/2009Dec/0155.html

> The Positioned Layout draft on my blog
> <http://www.xanthir.com/blog/b48H0>  addresses this more generally.  To
> do something like "fixed in parent", you'd do this:
>
> .fixed-in-parent {
>    position: relative; /* or absolute, whatever */
>    position-root-top: bottommost(self top, window top);
>    position-root-right: leftmost(self right, window right);
>    position-root-bottom: topmost(self bottom, window bottom);
>    position-root-left: rightmost(self left, window left);
>    top: 0; right: 0; bottom: 0; left: 0;
> }
>
> Hmm, feels like I need to add some magic to make this sort of thing
> less verbose.

.fixed-in-parent {
   position: persistent; /* do magic */
}

~fantasai
Received on Tuesday, 9 August 2011 06:30:02 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:43 GMT