Skip to content

Commit 1e79978

Browse files
Marcel Dütscherclaude
andcommitted
Site: center the Get-Started difficulty cards as a group
The 4 difficulty cards used `repeat(auto-fit, minmax(220px, 1fr))`, which let each card stretch to fill 1/4 of the section's max-width on wide viewports. With h2 and section-lead above sitting at their natural text width, the stretched cards read as left-aligned — they touch the section's left content edge while the heading text above starts further in. Capped each card at 260 px (`minmax(220px, 260px)`) and added `justify-content: center` so the row of cards centers itself within the grid. Mobile is unchanged: only one card fits per row, auto-fit collapses the unused tracks, the single column sits centered automatically. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d48d21f commit 1e79978

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

site/styles.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,9 +589,13 @@ pre code { background: none; padding: 0; color: inherit; }
589589

590590
.difficulty-grid {
591591
display: grid;
592-
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
592+
/* Cap each card at 260 px instead of stretching to 1fr — otherwise on
593+
wide viewports the four cards sprawl across the full section and read
594+
as "left-aligned" against the narrower h2/section-lead above. */
595+
grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
593596
gap: 14px;
594597
margin: 20px 0 32px;
598+
justify-content: center;
595599
}
596600
.difficulty-card {
597601
background: var(--surface);

0 commit comments

Comments
 (0)