W3C home > Mailing lists > Public > public-css-archive@w3.org > September 2020

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

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Fri, 25 Sep 2020 18:40:56 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-699090646-1601059255-sysbot+gh@w3.org>
I think your problem is https://drafts.csswg.org/css-position/#sticky-pos

> the box must be visually shifted (as for relative positioning) to be inward of that sticky view rectangle edge, **insofar as it can while its position box remains contained within its containing block**

where the containing block is usually the parent.

But rather than things like `sticky-parent: "div" 2`, it think it may be easier to let authors switch this containment to the [absolute positioning containing block](https://drafts.csswg.org/css-position/#absolute-positioning-containing-block) rather than the actual containing block. Then you would only need to add `position: relative` to the desired ancestor and that's it.

I think this is basically a duplicate of #2496, which also proposes a `sticky` property similar to your `sticky-position`.

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 25 September 2020 18:40:59 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:17 UTC