Why set 100% height for a child ( .inner ) flex element? For each element in this code, height "set" to auto .
Since the beginning of CSS in the 1990s, the percentage height of the child in the stream has required a certain height in the parent. Otherwise, the default child element is height: auto .
The only valid height for the parent comes from the height property. Other forms of height, such as min-height and max-height , are not allowed for this purpose.
Although the specification never explicitly indicated that the parent should use the height property - only the general "height" height is used - using the height property has become the traditional interpretation and the prevailing implementation in browsers.
However, in recent years, browsers have expanded their interpretation of the specification language to include other forms of height, such as flex-basis .
So, in 2017, it is not surprising that height: 100% does not allow height: auto in all cases where the parent does not have the specified height .
Today, browsers can also look for a height reference from flex-grow , flex-basis , align-items or something else.
Here is some more information about the height properties and percentages:
And then the interventions :
The intervention is that the user agent decides to deviate slightly from the standardized behavior to provide a significantly enhanced user interface.
These are browser makers, mostly saying, "Thanks for the spec guide, but we know our users and we can do better." So they leave - the script, hoping to be more thoughtful and intuitive.
Here are some examples of possible Chrome interventions:
Thus, between interventions and a broader interpretation of height: 100% rules can give full height, even if the parent does not have height .
How do .inner elements know that 100% height is the height of the highest flex child ( .col-4 ) in a row?
They do not do this. They simply stretch to the height of the container, the height of which is set by the highest element in the row.