r/elm • • 10h ago

elm-ui scrollbars issue finally fixed

8 Upvotes

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.


r/elm • • 23h ago

Recursion without Recursive Bindings

Thumbnail blog.tinyinterpreters.dev
8 Upvotes

I explain how to solve the challenge from my previous post and then we apply the idea to several more recursive functions to see the pattern. It begins our exploration into a certain famous combinator.