Skip to content

Commit 489b8da

Browse files
committed
Fix ModelCardFitExplorer card grid for consistent heights, overflow, and responsive stacking
1 parent bcaa266 commit 489b8da

1 file changed

Lines changed: 22 additions & 8 deletions

File tree

website/src/components/VisualElements/ModelCardFitExplorer.module.css

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,21 +227,32 @@
227227

228228
.fieldGrid {
229229
grid-template-columns: repeat(2, minmax(0, 1fr));
230+
grid-auto-rows: 1fr;
230231
gap: 1px;
231232
background: var(--border-default);
232233
}
233234

234235
.cardField {
235236
display: grid;
236-
grid-template-rows: auto auto minmax(15rem, auto) minmax(4.5rem, auto) minmax(4.5rem, auto);
237+
grid-template-rows: auto minmax(calc(var(--lh-lg) * 2), auto) minmax(15rem, 1fr) minmax(4.5rem, auto) minmax(4.5rem, auto);
237238
gap: var(--space-2);
238-
align-content: start;
239239
min-width: 0;
240+
min-height: 0;
240241
padding: var(--space-2);
241242
border: 0;
242243
background: var(--surface-page);
243244
}
244245

246+
/* Every field keeps its native evidence visual inside the same reading frame. */
247+
.cardField > * {
248+
min-width: 0;
249+
}
250+
251+
.cardField .fieldImplication,
252+
.cardField .gotcha {
253+
align-content: start;
254+
}
255+
245256
.cardField .fieldLabel {
246257
margin: 0;
247258
color: var(--text-heading);
@@ -250,14 +261,16 @@
250261

251262
.fieldSummary {
252263
display: grid;
264+
align-content: start;
265+
min-height: calc(var(--lh-lg) * 2);
253266
gap: var(--space-0h);
254267
margin: 0;
255268
}
256269

257270
.fieldGraphic {
258271
display: grid;
259272
align-items: center;
260-
min-height: 56px;
273+
min-height: 0;
261274
margin: 0;
262275
}
263276

@@ -747,22 +760,23 @@
747760
grid-column: 2;
748761
}
749762

750-
.modelButton:last-child {
751-
grid-column: 1 / -1;
752-
}
753-
754763
.modelCard {
755764
min-height: 0;
756765
}
757766
}
758767

759768
@media (max-width: 30rem) {
769+
.modelSelector,
760770
.fieldGrid {
761771
grid-template-columns: 1fr;
762772
}
763773

774+
.fieldGrid {
775+
grid-auto-rows: auto;
776+
}
777+
764778
.cardField {
765-
grid-template-rows: auto;
779+
grid-template-rows: auto auto minmax(15rem, auto) auto auto;
766780
}
767781
}
768782

0 commit comments

Comments
 (0)