I have a section with min-height: 100vh. The section in then split into 2 parts, the left part contains a list of links and the right part displays an image which has 100% height.
When hovering over these links the src of the image on the right will change to display an image associated with the link (there is also an image that is displayed by default).
What I am struggling with is how to make the images fill the whole right <picture> container without expanding it in any way? So the image will either be the min height of 100vh OR the same height as the list (if it's over 100vh) I feel like I should be using background-image or something and that this is quite basic, but I'm stumped!
Here's my structure in HTML with inline CSS:
<section style="min-height: 110vh; display: flex">
<article style="min-width: 50%; border-right: 2px solid black;">
<ul style="padding: 48px; gap: 32px; display: flex; flex-direction: column">
<a href="">One</a>
<a href="">Two</a>
<a href="">Three</a>
<a href="">Four</a>
<a href="">Five</a>
</ul>
</article>
<picture style="flex-grow: 1; object-fit: cover; background-color: aquamarine">
<img src="https://flif.info/example-images/fish.png" alt="image" style="display: block">
</picture>
</section>