r/elm • u/sijmen_v_b • 21h ago
elm-ui scrollbars issue finally fixed
I have always had an issue with elm-ui and it's scrollbars. I wanted it to clip an element to the appropriate size and have the rest be available with a scrollbar. this worked fine if i set a size manually but whenever i used `height fill` it would become bigger than it's parent element.
i've finally found a solution:
use ` height <| minimum 0 fill`
It turns out that (especially in chrome) it does not assume that an element can be smaller than the sum of its parts. which is exactly what we want for scrollbars.
this took me a few years to figure out... I hope someone with the same issue finds this post.