W3C home > Mailing lists > Public > www-style@w3.org > November 2012

Re: Alternative to Sticky Positioning

From: Markus Ernst <derernst@gmx.ch>
Date: Wed, 07 Nov 2012 17:04:45 +0100
Message-ID: <509A869D.3060509@gmx.ch>
To: Rudolph Gottesheim <r.gottesheim@loot.at>
CC: www-style@w3.org
Am 07.11.2012 16:19 schrieb Rudolph Gottesheim:
> I've got an alternative idea for the problem that Sticky Positioning[1]
> is trying to solve. I think it can potentially solve more use cases than
> just this one.
>
> What if we had a pseudo-class that matched elements based on whether
> they are inside the viewport or not? Then you could give the element a
> position: fixed when it is not. Like this:
>
> [role=navigation]:viewport-partially-hidden {
>      position: fixed;
>      top: 0;
>      left: 0;
> }

Wouldn't this jump unexpectedly when being scrolled out of the viewport? 
(Except it was originally positioned at top:0 and left:0 - but in this 
case position:fixed would be sufficient anyway.)
Received on Wednesday, 7 November 2012 16:07:13 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:02 GMT