0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-18 10:52:19 +01:00

Correctly document how to add to Sass maps (#31107)

Fixes #31089.

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
Mark Otto 2020-06-19 21:29:20 -07:00 committed by GitHub
parent 9ca811eed5
commit 806f64e162
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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