elm-ui
elm-ui copied to clipboard
Broken intuition: "Take available space and let me scroll through content"
Sample showing the problem: https://ellie-app.com/8Hwz7S56mQWa1
Workaround with custom CSS: https://ellie-app.com/8HJZYzfLJdca1
Like in most text editors, the textarea field is the main element on the page. Whether it's empty or overflown, we want it to occupy all available space within the context of its parent. If overflown, we want to scroll though the content.
Expected behavior
Elm-ui provides an intuitive way of describing such intent:
Input.multiline [width fill, height fill, scrollbar] {..}
, can be read as "Textarea, take all available space and let me scroll through the content if overflown, stay big if not.".
Actual behavior Textarea grows to its content, expanding the parent.
Versions N/A
It might be fixable by using min-height: 0
on all row
and column
elements
see also https://stackoverflow.com/questions/21515042/scrolling-a-flexbox-with-overflowing-content/69889010#69889010