Can a vertical scroll be implemented on a container with an unknown height using flexbox?
The use of max-height
is not feasible, as it would limit the height to a specific number that may not work for all screen sizes.
Here is a basic example of what is needed:
<div class="list flex-vertical">
<header>Some header</header>
<ul class="flex-vertical">
<li>Item1</li>
<li>Item2</li>
<li>Item3</li>
<li>Item4</li>
...
</ul>
</div>
Only the ul
should have a scroll, but the height is unknown.