]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Correctly document how to add to Sass maps (#31107)
authorMark Otto <markd.otto@gmail.com>
Sat, 20 Jun 2020 04:29:20 +0000 (21:29 -0700)
committerGitHub <noreply@github.com>
Sat, 20 Jun 2020 04:29:20 +0000 (07:29 +0300)
Fixes #31089.

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
site/content/docs/5.0/customize/sass.md

index 1e6808f514c37a7f58fbb4fa939ea9cc3ff874bd..92f2e600158b3400a71f466b9e64c57c2047012b 100644 (file)
@@ -110,12 +110,16 @@ $theme-colors: (
 
 ### Add to map
 
-To add a new color to `$theme-colors`, add the new key and value:
+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`.
 
 {{< highlight scss >}}
-$theme-colors: (
+// Create your own map
+$custom-colors: (
   "custom-color": #900
 );
+
+// Merge the maps
+$theme-colors: map-merge($theme-colors, $custom-colors);
 {{< /highlight >}}
 
 ### Remove from map