Skip to content

Commit

Permalink
🔧 chore(grid.scss): Fix grid row support, grid rows will now have a m…
Browse files Browse the repository at this point in the history
…ax of 6
  • Loading branch information
Spiderpig86 committed Aug 5, 2023
1 parent c60a237 commit 74cdab9
Show file tree
Hide file tree
Showing 8 changed files with 1,407 additions and 2,060 deletions.
1,147 changes: 463 additions & 684 deletions dist/cirrus-all.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cirrus-all.min.css

Large diffs are not rendered by default.

1,147 changes: 463 additions & 684 deletions dist/cirrus-core.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cirrus-core.min.css

Large diffs are not rendered by default.

1,147 changes: 463 additions & 684 deletions dist/cirrus.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cirrus.min.css

Large diffs are not rendered by default.

18 changes: 13 additions & 5 deletions src/base/grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

:root {
--grid-template-column: repeat(#{$grid-columns}, minmax(0, 1fr));
--grid-template-rows: repeat(#{$grid-rows}, minmax(0, 1fr));
--grid-column-start: auto;
--grid-column-end: auto;
--grid-row-start: auto;
Expand All @@ -32,18 +33,25 @@
grid-column: span #{$i} / span #{$i};
}

/* Row expansion */
.grid-r-#{$i}#{$suffix} {
grid-row: span #{$i} / span #{$i};
}

/* Cell Column Start/End */
.grid-cs-#{$i}#{$suffix} {
grid-column-start: #{$i};
}
.grid-ce-#{$i}#{$suffix} {
grid-column-end: #{$i + 1};
}
}

@for $i from 1 through $grid-rows {
/* Templates */
.grid-rows-#{$i}#{$suffix} {
--grid-template-column: repeat(#{$i}, minmax(0, 1fr));
}

/* Row expansion */
.grid-r-#{$i}#{$suffix} {
grid-row: span #{$i} / span #{$i};
}

/* Cell Row Start/End */
.grid-rs-#{$i}#{$suffix} {
Expand Down
2 changes: 2 additions & 0 deletions src/internal/_config.scss
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ $default-config: (
properties: (
default-grid-gap: 2,
grid-columns: 12,
grid-rows: 6,
),
),
heights:
Expand Down Expand Up @@ -902,6 +903,7 @@ $flex-width: math.div(1, $flex-columns);

$grid-properties: functions.get-with-extend($all-config, grid, properties);
$grid-columns: map.get($grid-properties, grid-columns);
$grid-rows: map.get($grid-properties, grid-rows);
$default-grid-gap: map.get($grid-properties, default-grid-gap);

$opacities: functions.get-with-extend($all-config, opacity);
Expand Down

0 comments on commit 74cdab9

Please sign in to comment.