Resize image to max height of height: auto container - this seems like it should be easy.
Rather than trying to explain what I'm doing, here's a codepen: https://codepen.io/sheepman4267/pen/zYMvJbY
I want the div to be the minimum height of the text it contains, and I want the image to grow/shrink with that. Logically, it seems to me like
I want the div to be the minimum height of the text it contains, and I want the image to grow/shrink with that. Logically, it seems to me like
height: min-content on the div and height: auto on the image should do this, but it doesn't. Is there a pure CSS way to do this, or am I going to have to mess with JS?