Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .changeset/fresh-tiles-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react-brand': patch
---

Updates compact `Tiles` density so narrow viewports shows four items per row with smaller icons, while medium (tablet) show six items per row.
15 changes: 13 additions & 2 deletions packages/react/src/Tiles/Tiles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
padding: 0;
}

.Tiles--layout-compact .Tiles-grid {
--tiles-columns: 4;
}

@media screen and (min-width: 48rem) {
.Tiles--layout-default .Tiles-grid {
--tiles-columns: 4;
Expand All @@ -33,7 +37,7 @@

@media screen and (min-width: 48rem) {
.Tiles--layout-compact .Tiles-grid {
--tiles-columns: 4;
--tiles-columns: 6;
}
}

Expand Down Expand Up @@ -137,7 +141,14 @@

.Tiles--layout-compact .Tiles-item-media svg,
.Tiles--layout-compact .Tiles-item-media img {
height: var(--base-size-32);
height: var(--base-size-28);
}

@media screen and (min-width: 48rem) {
.Tiles--layout-compact .Tiles-item-media svg,
.Tiles--layout-compact .Tiles-item-media img {
height: var(--base-size-32);
}
}

.Tiles-item-label {
Expand Down
Loading