- From: jonjohnjohnson via GitHub <sysbot+gh@w3.org>
- Date: Fri, 24 Feb 2023 08:08:56 +0000
- To: public-css-archive@w3.org
Not the cleanest solution, but negative margins can be used to "combat" blocks being unstuck from their constrained box offsets during overscroll in **webkit**/**gecko**. You just also need to offset the opposing margin to keep the rest of the flow sane, **as well as** keep in mind that this compensating opposite margin will affect where the block becomes unstuck when reaching the opposing edge of its containing block. eg ```css body { background: #f99; margin: 0; } nav { height: 10vh; background: #9ff; position: sticky; top: 0; margin-top: -100vh; margin-bottom: 100vh; } main { height: 200vh; background: #99f; border-top: 5vh solid #999; } ``` -- GitHub Notification of comment by jonjohnjohnson Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8309#issuecomment-1443059377 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 24 February 2023 08:08:58 UTC