Use minmax(0,1fr) for story-photo sub-grid img row — definite height resolves % correctly
This commit is contained in:
+3
-3
@@ -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 is a grid-within-grid: rows = 1fr (image) + auto (caption) */
|
||||||
.story-photo {
|
.story-photo {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: 1fr auto;
|
grid-template-rows: minmax(0, 1fr) auto;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.story-photo img {
|
.story-photo img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 0;
|
height: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
transition: transform 0.6s;
|
transition: transform 0.6s;
|
||||||
display: block;
|
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 {
|
.story-block:hover .story-photo img {
|
||||||
transform: scale(1.03);
|
transform: scale(1.03);
|
||||||
|
|||||||
Reference in New Issue
Block a user