Skip to content

Commit affb46e

Browse files
💄🔧:put the rail's numbers on one line
A grid item stretches to the tallest cell, and `column-reverse` packs toward the bottom of it, so the labels lined up and the numbers sat wherever each label's wrapping left them. The labels run from one line to four, so that was four heights, and narrow widths wrap them more, which is where it looked worst. `align-self: start` takes the stretch away, so each pair is only as tall as itself and every number starts on the same line. The values also get a floor the height of the larger one, so the pair that reads CJS + ESM rather than a numeral stops sitting its label above everyone else's. Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is> Assisted-by: Claude-Code:claude-opus-5
1 parent 50de823 commit affb46e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎_assets/styles/_home.scss‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,17 @@
334334
gap: 1rem 1.5rem;
335335
}
336336

337+
// `align-self: start` is what keeps the numbers on one line. A grid item
338+
// stretches to the tallest cell by default, and in `column-reverse` the
339+
// content packs toward the bottom of it, so the labels lined up and the
340+
// numbers floated at whatever height each label's wrapping left them. The
341+
// labels run from one line to four, so that was four different heights, and
342+
// worse at narrow widths where they wrap more.
337343
.stat {
338344
display: flex;
339345
flex-direction: column-reverse; /* value reads above its label */
340346
gap: 0.375rem;
347+
align-self: start;
341348
}
342349

343350
// Bootstrap's reboot bolds every dt; these dl/dt/dd pairs are borrowed for
@@ -350,7 +357,10 @@
350357
color: var(--tertiary);
351358
}
352359

360+
// A floor the size of the larger value, so the one that is words rather than
361+
// a numeral does not sit its label higher than the rest.
353362
.stat dd {
363+
min-height: 1.375rem;
354364
font-family: var(--mono);
355365
font-size: 1.375rem;
356366
font-weight: 700;

0 commit comments

Comments
 (0)