Re: [csswg-drafts] [css-position][css-sticky] Should overflowing sticky element continue scrolling until meeting opposite offset? (#2558)

> Could you please create an animated graphic like you did above showing how the behavior is when scrolling up again?

I propose scrolling up again would simply be that gif played in reverse. Please, if you have not already done so, see the examples I linked in the original filing.

> Examples -> http://jsbin.com/fajosud/2

The second scroller in the example shows my proposed behavior with description, whether scrolling down or up. And exactly like the title of this post refers to, it's only about an overflowing sticky element being able to **continue** scrolling until reaching the opposite edge/offset inside the scrollport.

In my original post I say...

> I'd imagine it more useful if when scrolling from an elements sticky edge, it continues to scroll until meeting its opposite offset value, then sticking, if its height plus offset value "overflows" the opposite edge of the scrollport.

I'm just guessing that **movement relative to scrolling direction** is outside the bounds of what sticky, a position scheme, wants to handle and is more something that plays well into houdinis scroll/animation timeline features.

However, I **definitely** agree with you that providing a simpler solution for swinging/hidey behaviors in the web is needed. We see a plethora of native and web UI using these techniques and many devs providing solutions like the "sticky kit" you linked. A few years ago I even made my own plugin to provide hidey bars as well as sidebars like the "sticky kit" that use the same underlying mechanisms.

https://assets.jonjohnjohnson.com/scripts/swingy/

Hidey bars, which are often seen as both headers and footers, moving with or against the scrolling direction, are seen all over the ui landscape. So regardless of placement/size, they are simply blocks of content which move in relation to their scroll direction between offsets, calculated from both the geometry of itself and scrollport? To me that describes "hidey bars" as well as the "sticky kit" example. It just is that the they have different offsets with which to adhere.

-- 
GitHub Notification of comment by jonjohnjohnson
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2558#issuecomment-492404627 using your GitHub account

Received on Tuesday, 14 May 2019 20:50:26 UTC