[csswg-drafts] [css-position][css-sticky] Make sticky positioning less restrictive (#5528)

ianthedev has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-position][css-sticky] Make sticky positioning less restrictive ==
The sticky positioning (`position: sticky`) was implemented in a way which is a bit too restrictive. We need a way to free a sticky element from being strictly confined within its **direct** parent.

A use case is that a blog post has a list of social sharing links. And that list needs to be sticky positioned at the left side of the blog post so that readers can always see the list when they are scrolling the page. However, in HTML, the list is in the `footer` element of the blog. Without moving the list outside the `footer` element and to the very top of the blog post, the desired sticky positioning would be impossible.

So we need a way for freely defining within which parent element our sticky element is being sticky.

We also need a way that allows us to firstly position an element at whatever position we desired and then set it to a sticky element. Currently, `position: sticky` is not able to do the first step because we can no longer use `position: absolute` in this case.

Current spec: https://www.w3.org/TR/css-position-3/#stickypos-insets


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5528 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 18 September 2020 15:26:42 UTC