Skip to content

Commit 806f64e

Browse files
mdoXhmikosR
andauthored
Correctly document how to add to Sass maps (#31107)
Fixes #31089. Co-authored-by: XhmikosR <[email protected]>
1 parent 9ca811e commit 806f64e

File tree

1 file changed

+6
-2
lines changed
  • site/content/docs/5.0/customize

1 file changed

+6
-2
lines changed

site/content/docs/5.0/customize/sass.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,16 @@ $theme-colors: (
110110

111111
### Add to map
112112

113-
To add a new color to `$theme-colors`, add the new key and value:
113+
Add new colors to `$theme-colors`, or any other map, by creating a new Sass map with your custom values and merging it with the original map. In this case, we'll create a new `$custom-colors` map and merge it with `$theme-colors`.
114114

115115
{{< highlight scss >}}
116-
$theme-colors: (
116+
// Create your own map
117+
$custom-colors: (
117118
"custom-color": #900
118119
);
120+
121+
// Merge the maps
122+
$theme-colors: map-merge($theme-colors, $custom-colors);
119123
{{< /highlight >}}
120124

121125
### Remove from map

0 commit comments

Comments
 (0)