Skip to content

Commit 067e8df

Browse files
authored
Fix alignment issue with o-deck (#2047)
1 parent 4a00bc6 commit 067e8df

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.changeset/eleven-dryers-vanish.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cloudfour/patterns': patch
3+
---
4+
5+
Fix issue where Deck objects would unexpectedly stretch columns at wider viewports

src/objects/deck/deck.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@
1818
* We define a media query for our initial grid so child elements will flex
1919
* for viewports smaller than our minimum column size.
2020
*
21-
* Our use of `auto-fit` means columns will be automatically created as space
22-
* allows.
21+
* `auto-fill` creates extra columns as space allows, and will not stretch
22+
* columns to fill empty space (which makes sure adjacent objects with
23+
* differing item counts will stay aligned).
2324
*/
2425

2526
@media (width >= breakpoint.$xs) {
2627
grid-template-columns: repeat(
27-
auto-fit,
28+
auto-fill,
2829
minmax(#{size.$width-card-column-min}, 1fr)
2930
);
3031
}

0 commit comments

Comments
 (0)