Skip to content

Commit

Permalink
Correctly document how to add to Sass maps (#31107)
Browse files Browse the repository at this point in the history
Fixes #31089.

Co-authored-by: XhmikosR <[email protected]>
  • Loading branch information
mdo and XhmikosR authored Jun 20, 2020
1 parent 9ca811e commit 806f64e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions site/content/docs/5.0/customize/sass.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 806f64e

Please sign in to comment.