Use minmax(0,1fr) for story-photo sub-grid img row — definite height resolves % correctly

This commit is contained in:
2026-03-09 02:56:37 +08:00
parent f3dc0eb7ab
commit 3cfc697d17
+3 -3
View File
@@ -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);