In #2, how is the height of .footer being calculated?
#1
.footer {
}
img {
width: 100%;
}
<div class="footer">
<img src="https://media.istockphoto.com/photos/whole-kiwi-fruit-and-half-kiwi-fruit-on-white-picture-id834807852?k=6&m=834807852&s=612x612&w=0&h=qyouQR9CrIlrPo8FG72PCt1eBV_lTVtnuwVlo9hWZY8=" class="linked-image">
</div>
In this example, the height of the footer is calculated through something like: the width of the initial-containing-block (html) & taking into account the aspect-ratio of the image.
#2
.footer {
font-size: 15px;
line-height: 1.2em;
width: 100vw;
background-color: #090B19;
color: white;
}
.footer .icons {
display: -ms-grid;
display: grid;
-ms-grid-columns: (1fr)[3];
grid-template-columns: repeat(3, 1fr);
-ms-grid-rows: 100%;
grid-template-rows: 100%;
margin: 0 auto;
}
img {
height: 100%;
width: 100%;
}
<div class="footer">
<div class="icons">
<a href="www.google.com" target="_blank"><img src="https://www.applesfromny.com/wp-content/uploads/2020/05/Jonagold_NYAS-Apples2.png" class="github-img"></a>
<a href="https://stackoverflow.com/users/14037283/tonitone120?tab=summary" target="_blank"><img src="https://www.applesfromny.com/wp-content/uploads/2020/05/Jonagold_NYAS-Apples2.png" class="so-image"></a>
<a href="www.google.com" target="_blank"><img src="https://media.istockphoto.com/photos/whole-kiwi-fruit-and-half-kiwi-fruit-on-white-picture-id834807852?k=6&m=834807852&s=612x612&w=0&h=qyouQR9CrIlrPo8FG72PCt1eBV_lTVtnuwVlo9hWZY8=" class="linked-image"></a>
</div>
</div>
I understand the width of each image is about a third of the footer's width. What is determining the footer's height? I have a feeling the intrinsic dimensions of the images had something to do with it but neither image is scaling up to be its aspect ratio. img's height is set to be 100%. 100% of what?