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

Re: Sticky Positioning

From: Maciej Stachowiak <mjs@apple.com>
Date: Thu, 28 Jun 2012 14:25:46 -0700
Cc: Ojan Vafai <ojan@chromium.org>, Edward O'Connor <eoconnor@apple.com>, www-style@w3.org, James Robinson <jamesr@chromium.org>
Message-id: <DB6196BA-F91C-4B3A-9F13-C5BC666F25C2@apple.com>
To: Alexandre Elias <aelias@chromium.org>

On Jun 28, 2012, at 1:52 PM, Alexandre Elias <aelias@chromium.org> wrote:

> Sorry about that, looks like the behavior is currently restricted to Android.
> 
> You can simulate an Android browser in desktop Chrome (I tested the following using version 20 beta) by doing the following:
> - Visit http://google.com/
> - Click "Developer tools", then the small gear at the bottom right of the panel.
> - Click "Override User Agent" and select "Android 2.3 - Nexus S" (not Galaxy Nexus as the high resolution somehow breaks the behavior I'm describing in this desktop simulation mode -- though it does happen on a real Galaxy Nexus)
> - Reload the page to see the mobile version, then click "Restaurants" as before.
> 
> You should see the map is sticky, then appears to reach a limit and gradually falls out of view if you scroll down to the bottom of the page.

With these steps, I'm not able to replicate the behavior you describe. I see the map sticking, but not disappearing close to the bottom. I do see it tracking its container until it hits the top. What I see can definitely be replicated with position: sticky as proposed. I think the more complex behavior you describe can also be replicated with position: sticky, but I'm hesitant to say definitively without seeing the behavior first. Specifically, I think that if you make the sticky element's containing block stop short of the bottom of the page, you will get the described behavior. Again, I'm not 100% sure as I can't see it for myself yet.

Cheers,
Maciej
Received on Thursday, 28 June 2012 21:26:11 GMT

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