Ensure media always maintains aspect ratio during manual resize

Add max-width/height constraints and object-position to guarantee aspect ratio is preserved when user manually resizes the window
This commit is contained in:
russell@unturf.com 2026-01-21 10:37:44 -05:00
parent 45ebe5c0ae
commit 55fe55041f

View file

@ -24,12 +24,20 @@
position: relative;
}
/* Media element styles */
/* Media element styles - always maintain aspect ratio */
#media {
grid-area: media;
width: 100%;
height: 100%;
max-width: 100%;
max-height: 100%;
object-fit: contain;
object-position: center;
}
/* For images, ensure aspect ratio is preserved */
img#media {
display: block;
}
/* Player controls overlay */