From f530e7934d9c4d5d21dfc3b5843794b55986cec9 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 18 Jun 2020 16:39:59 -0700 Subject: [PATCH] Correctly document how to add to Sass maps Fixes #31089. --- site/content/docs/5.0/customize/sass.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/site/content/docs/5.0/customize/sass.md b/site/content/docs/5.0/customize/sass.md index 1e6808f514c3..92f2e600158b 100644 --- a/site/content/docs/5.0/customize/sass.md +++ b/site/content/docs/5.0/customize/sass.md @@ -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