- From: jonjohnjohnson via GitHub <sysbot+gh@w3.org>
- Date: Mon, 06 Aug 2018 19:16:54 +0000
- To: public-css-archive@w3.org
Even more web compat when there are conflicting box offsets alongside margins that offset the sticky elements in-flow position back to the edges of the scroll container.
http://jsfiddle.net/78oamb6u/53/
- firefox and chrome only stick to the top
- chrome doesn't ever move the sticking element fully into view, because of negative margin
- firefox creates extra overflow as you scroll and moves the sticking element once reaching the height of the sticking element.
- safari, again, splits the difference and "interpolates" the sticking position between offsets based upon scroll position. This, in effect, offers inverted scrolling.
```css
.el {
position: sticky;
top: 0;
bottom: 0;
height: 1000px;
margin-bottom: -1000px;
margin-top: -1000px;
}
.el::before,
.el::after {
height: 1000px;
}
```
I know the spec doesn't currently have an editor and you guys seem to be more or less hands off, having implementors discover some emergent parity, but I think a bit of direction from the group could help stabilize.
--
GitHub Notification of comment by jonjohnjohnson
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1294#issuecomment-410822157 using your GitHub account
Received on Monday, 6 August 2018 19:19:58 UTC