Since you are using the percentage height in the flex container ...
ol { min-height: 100%; }
... you also need to determine the height for the parent and root elements .
HTML (no change)
<ol> <li>List item 1</li> <li>List item 2</li> <li>List item 3</li> </ol>
CSS
html, body { height: 90%; } ol { min-height: 100%; display: flex; flex-direction: column; } ol li { flex: 1; }
DEMO: http://jsfiddle.net/kzL4305k/1/
I think the problem is with the need to set height: 100% for each one parent element is fully linked to html. Could this be so?
Yes this is correct. If you use percentage heights, you need to specify the height for each individual parent to the root element ( html ). I explained the reason for this here:
My list is deeply nested and setting all of these layout heights. I would prefer to work only with the height of the liquid.
You do not need to set the height for the parent elements unless you use percentages. Try using min-height in pixels on flexible containers and then flex-grow: 1 will handle the height problem for flex elements.
source share