Skip to content

Commit a7f1ee7

Browse files
authored
Update grid build to include grid utilities (#42172)
Also fixes negative margin/gap values by separating negative spacers and doing a multi-map merge
1 parent 7ba9b95 commit a7f1ee7

3 files changed

Lines changed: 12 additions & 46 deletions

File tree

scss/_config.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,18 @@ $min-contrast-ratio: 4.5 !default;
3030
// scss-docs-start spacer-variables-maps
3131
$spacer: 1rem !default;
3232
$spacers: (
33-
-2: $spacer * -.5,
34-
-1: $spacer * -.25,
3533
0: 0,
3634
1: $spacer * .25,
3735
2: $spacer * .5,
3836
3: $spacer,
3937
4: $spacer * 1.5,
4038
5: $spacer * 3,
4139
) !default;
40+
41+
$negative-spacers: (
42+
"-1": $spacer * -.25,
43+
"-2": $spacer * -.5,
44+
) !default;
4245
// scss-docs-end spacer-variables-maps
4346

4447
$sizes: (

scss/_utilities.scss

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -507,51 +507,8 @@ $utilities: map.merge(
507507
responsive: true,
508508
property: margin-inline-start,
509509
class: ms,
510-
values: map.merge($spacers, (auto: auto))
510+
values: map-merge-multiple($spacers, $negative-spacers, (auto: auto))
511511
),
512-
// Negative margin utilities
513-
// "negative-margin": (
514-
// responsive: true,
515-
// property: margin,
516-
// class: m,
517-
// values: $negative-spacers
518-
// ),
519-
// "negative-margin-x": (
520-
// responsive: true,
521-
// property: margin-inline,
522-
// class: mx,
523-
// values: $negative-spacers
524-
// ),
525-
// "negative-margin-y": (
526-
// responsive: true,
527-
// property: margin-block,
528-
// class: my,
529-
// values: $negative-spacers
530-
// ),
531-
// "negative-margin-top": (
532-
// responsive: true,
533-
// property: margin-block-start,
534-
// class: mt,
535-
// values: $negative-spacers
536-
// ),
537-
// "negative-margin-end": (
538-
// responsive: true,
539-
// property: margin-inline-end,
540-
// class: me,
541-
// values: $negative-spacers
542-
// ),
543-
// "negative-margin-bottom": (
544-
// responsive: true,
545-
// property: margin-block-end,
546-
// class: mb,
547-
// values: $negative-spacers
548-
// ),
549-
// "negative-margin-start": (
550-
// responsive: true,
551-
// property: margin-inline-start,
552-
// class: ms,
553-
// values: $negative-spacers
554-
// ),
555512
// Padding utilities
556513
"padding": (
557514
responsive: true,

scss/bootstrap-grid.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ $utilities: map-get-multiple(
1717
(
1818
"display",
1919
"order",
20+
"grid-column-counts",
21+
"grid-columns",
22+
"grid-auto-flow",
23+
"gap",
24+
"row-gap",
25+
"column-gap",
2026
"flex",
2127
"flex-direction",
2228
"flex-grow",

0 commit comments

Comments
 (0)