Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions docs/.vitepress/theme/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -811,12 +811,15 @@
text-align: center;
}

/* The stacked hero centers its column, so the text block is shrink-to-fit and
would otherwise be widened past the viewport by the tile grid below. */
.usage-hero-text {
text-align: center;
align-self: stretch;
min-width: 0;
}

.usage-hero-actions,
.usage-hero-tiles {
.usage-hero-actions {
justify-content: center;
}

Expand All @@ -825,6 +828,26 @@
margin-left: auto;
margin-right: auto;
}

/* Once the hero stacks, wrapping leaves ragged trailing rows. Even columns
keep the tiles aligned at every count. The floor clears the widest tile
("Rust" plus its pill), so phones drop to one column rather than squeezing
a label against its pill. */
.usage-hero-tiles {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(208px, 1fr));
width: 100%;
max-width: 440px;
}

.usage-hero-tiles .usage-tile {
justify-content: center;
}

/* An odd tile count would otherwise leave the last one alone in a column. */
.usage-hero-tiles > :last-child:nth-child(odd) {
grid-column: 1 / -1;
}
}

@media (max-width: 768px) {
Expand Down
Loading