Skip to content

Commit bac89ee

Browse files
authored
More o-deck column modifiers (#1929)
1 parent fe55de9 commit bac89ee

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.changeset/dirty-vans-wonder.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cloudfour/patterns': minor
3+
---
4+
5+
Increase the supported column modifiers from 4 to 6 for the Deck layout object to support smaller content chunks

src/objects/deck/deck.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* maximum or to coordinate with adjacent elements.
3939
*/
4040

41-
@for $i from 1 through 4 {
41+
@for $i from 1 through 6 {
4242
.o-deck--#{$i}-column {
4343
@include media-query.breakpoint-classes($from: s, $to: xl) {
4444
grid-template-columns: repeat(#{$i}, 1fr);

src/objects/deck/deck.stories.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const alignmentClasses = {
5454
control: {
5555
type: 'range',
5656
min: 1,
57-
max: 4,
57+
max: 6,
5858
step: 1,
5959
},
6060
},
@@ -144,7 +144,7 @@ When used in WordPress, the `alignwide` and `alignfull` block alignment styles h
144144

145145
While automatic columns are convenient, there are times when a specific column count is desired. For example, you may want to limit a design to three columns at larger breakpoints to align with adjacent elements.
146146

147-
To do this, add a modifier class in the format of `o-deck--X-column@Y`, where `X` is the desired column count (from 1 to 4) and `Y` is the desired [breakpoint](/docs/design-tokens-breakpoint--page) (from `s` to `xl`). In this example, we force the grid to display three columns starting from the `m` breakpoint.
147+
To do this, add a modifier class in the format of `o-deck--X-column@Y`, where `X` is the desired column count (from 1 to 6) and `Y` is the desired [breakpoint](/docs/design-tokens-breakpoint--page) (from `s` to `xl`). In this example, we force the grid to display three columns starting from the `m` breakpoint.
148148

149149
<Canvas>
150150
<Story

0 commit comments

Comments
 (0)