aboutsummaryrefslogtreecommitdiff
path: root/scss/_functions.scss
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2021-07-06 11:31:20 -1000
committerGitHub <[email protected]>2021-07-06 14:31:20 -0700
commit47bbd945f0f92f50dd2f2dbdd78d10ada39a41cb (patch)
tree4bb93b698a31b403cfed938d38e5365493133e0e /scss/_functions.scss
parent66ce774e2abc0b10ef204b1a88cb750abaa96e93 (diff)
downloadbootstrap-47bbd945f0f92f50dd2f2dbdd78d10ada39a41cb.tar.xz
bootstrap-47bbd945f0f92f50dd2f2dbdd78d10ada39a41cb.zip
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 <[email protected]> Co-authored-by: XhmikosR <[email protected]>
Diffstat (limited to 'scss/_functions.scss')
-rw-r--r--scss/_functions.scss10
1 files changed, 10 insertions, 0 deletions
diff --git a/scss/_functions.scss b/scss/_functions.scss
index 870f36790..f8e43702d 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.
//