Skip to content

Commit 0bc39aa

Browse files
authored
Use empty Sass map and merge into it for easier customization of color maps (#23260)
1 parent cd22eb1 commit 0bc39aa

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

scss/_variables.scss

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ $gray-800: #343a40 !default;
6161
$gray-900: #212529 !default;
6262
$black: #000 !default;
6363

64-
$grays: (
64+
$grays: () !default;
65+
$grays: map-merge((
6566
100: $gray-100,
6667
200: $gray-200,
6768
300: $gray-300,
@@ -71,7 +72,7 @@ $grays: (
7172
700: $gray-700,
7273
800: $gray-800,
7374
900: $gray-900
74-
) !default;
75+
), $grays);
7576

7677
$blue: #007bff !default;
7778
$indigo: #6610f2 !default;
@@ -84,7 +85,8 @@ $green: #28a745 !default;
8485
$teal: #20c997 !default;
8586
$cyan: #17a2b8 !default;
8687

87-
$colors: (
88+
$colors: () !default;
89+
$colors: map-merge((
8890
blue: $blue,
8991
indigo: $indigo,
9092
purple: $purple,
@@ -98,9 +100,10 @@ $colors: (
98100
white: $white,
99101
gray: $gray-600,
100102
gray-dark: $gray-800
101-
) !default;
103+
), $colors);
102104

103-
$theme-colors: (
105+
$theme-colors: () !default;
106+
$theme-colors: map-merge((
104107
primary: $blue,
105108
secondary: $gray-600,
106109
success: $green,
@@ -109,7 +112,7 @@ $theme-colors: (
109112
danger: $red,
110113
light: $gray-100,
111114
dark: $gray-800
112-
) !default;
115+
), $theme-colors);
113116

114117
// Set a specific jump point for requesting color jumps
115118
$theme-color-interval: 8% !default;

0 commit comments

Comments
 (0)