Why does adding height: 100% cause a child to shrink, but removing it causes child to grow to fill space vertically?
I have a series of cards in a flex row. Some cards have longer titles, and therefore have a larger height. If I apply a height of 100% to all cards (using tailwind's h-full class), the smaller cards remain small. If I take that class away, the smaller cards grow to be 100% of the parent container's height, e.g. the height of the tallest card. You can see a demo here: https://codesandbox.io/p/sandbox/wonderful-ptolemy-lyh7xh <ul className="flex flex-col gap-4 items-stretch md:flex-row md:flex-wrap"> <li className="border-2 rounded-lg p-2 w-80 h-full">...</li> </ul> const { useState } = React; c
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.