Skip to content

Commit 511e973

Browse files
committed
Normalise gallery card thumbnail height
Gallery cards previously inherited each thumbnail's native aspect ratio, producing uneven card heights. Pin .sd-card-img-top to a fixed 200px box with `object-fit: contain` on a white background so images centre inside a uniform slot regardless of source dimensions.
1 parent 350d4e5 commit 511e973

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

docs/_static/css/custom.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,15 @@
22
div.cell_output table.dataframe {
33
font-size: 0.8em;
44
}
5+
6+
/* Gallery cards: normalise thumbnail height so cards line up regardless
7+
of the underlying image aspect ratio. Image is contained (not cropped)
8+
on a white background, centred in the slot. */
9+
.sd-card-img-top {
10+
height: 200px;
11+
width: 100%;
12+
object-fit: contain;
13+
background: #ffffff;
14+
padding: 8px;
15+
box-sizing: border-box;
16+
}

0 commit comments

Comments
 (0)