Re: Fixed-in-parent

On Mon, Aug 8, 2011 at 8:40 PM, Jonas Sicking <> 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:

Yup, this is a really useful pattern.

The Positioned Layout draft on my blog
<> 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.


Received on Tuesday, 9 August 2011 05:25:22 UTC