From 3cfc697d1744a9a919e3f025d228ff8f7b1c7e96 Mon Sep 17 00:00:00 2001 From: Omair Saleh Date: Mon, 9 Mar 2026 02:56:37 +0800 Subject: [PATCH] =?UTF-8?q?Use=20minmax(0,1fr)=20for=20story-photo=20sub-g?= =?UTF-8?q?rid=20img=20row=20=E2=80=94=20definite=20height=20resolves=20%?= =?UTF-8?q?=20correctly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/css/style.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/html/css/style.css b/html/css/style.css index b8cceb1..8273dd9 100644 --- a/html/css/style.css +++ b/html/css/style.css @@ -458,17 +458,17 @@ p { margin-bottom: 16px; max-width: 720px; } /* story-photo is a grid-within-grid: rows = 1fr (image) + auto (caption) */ .story-photo { display: grid; - grid-template-rows: 1fr auto; + grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; position: relative; } .story-photo img { width: 100%; - min-height: 0; + height: 100%; object-fit: cover; transition: transform 0.6s; display: block; - /* No height: 100% — avoids circular % resolution in sub-grid 1fr row */ + /* minmax(0,1fr) row = definite height → height:100% resolves correctly */ } .story-block:hover .story-photo img { transform: scale(1.03);