Email or username:

Password:

Forgot your password?
Top-level
Vesa Piittinen

@bramus There is also `overflow-anchor` as covered at CSS Tricks: css-tricks.com/books/greatest-

Here is a pen I made combining with another #CSS only trick to start the scroll from bottom with zero JavaScript:

codepen.io/Merri/pen/BagrowG

4 comments
Bramus

@MerriNet Checked this in detail and while it does work, it doesn’t seem to play nice in situations where the scroller goes from non-overflowing to an overflowing state (which could be considered a bug).

Also a pity that it requires an element (or generated content) that actually takes up space (i.e. `min-height: 1px`).

And finally no Safari support for this, unfortunately :-(

codepen.io/bramus/pen/GRbxOPX/

Vesa Piittinen

@bramus Interesting, my pen works in Safari. So I tested a bit and `display: flex;` is what breaks it in Safari.

I don't have time to check if there is a bug report for Safari on this.

Bramus

@MerriNet Oh, I think we may be talking about two things here. Was talking about `overflow-anchor` which I used in that last demo I linked to.

Vesa Piittinen

@bramus I'm talking about that. It works (stays in bottom also in Safari) once you remove `display: flex;` on the `#list` element.

Go Up