From 55fe55041f7ff2fd4811f7b21f6d4bd462b0d693 Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Wed, 21 Jan 2026 10:37:44 -0500 Subject: [PATCH] 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 --- make_post_sell/templates/player.j2 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/make_post_sell/templates/player.j2 b/make_post_sell/templates/player.j2 index bc464f4..fc8fe96 100644 --- a/make_post_sell/templates/player.j2 +++ b/make_post_sell/templates/player.j2 @@ -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 */