diff options
author | Mark Otto <markd.otto@gmail.com> | 2021-07-07 00:31:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-07 00:31:20 +0300 |
commit | 47bbd945f0f92f50dd2f2dbdd78d10ada39a41cb (patch) | |
tree | 4bb93b698a31b403cfed938d38e5365493133e0e /scss/_functions.scss | |
parent | 66ce774e2abc0b10ef204b1a88cb750abaa96e93 (diff) |
Add maps for all colors, document how to extend color utilities (#32319)
* Add maps for all colors, document how to extend color utilities
* Updates to make this more functional for v5
- Moves color maps into _variables.scss for now (felt weird to split them out when the variables are there)
- Adds a new function, map-merge-multiple(), and updates docs that reference combo-map
- Updates code snippet and docs guidance about how to extend the color utils to handle this
* Update site/content/docs/5.0/customize/color.md
Co-authored-by: Gaƫl Poupard <ffoodd@users.noreply.github.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Diffstat (limited to 'scss/_functions.scss')
-rw-r--r-- | scss/_functions.scss | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scss/_functions.scss b/scss/_functions.scss index 870f36790f..f8e43702d5 100644 --- a/scss/_functions.scss +++ b/scss/_functions.scss @@ -55,6 +55,16 @@ @return $result; } +// Merge multiple maps +@function map-merge-multiple($maps...) { + $merged-maps: (); + + @each $map in $maps { + $merged-maps: map-merge($merged-maps, $map); + } + @return $merged-maps; +} + // Replace `$search` with `$replace` in `$string` // Used on our SVG icon backgrounds for custom forms. // |