Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Cuppens <martijn.cuppens@gmail.com>2019-07-25 10:41:13 +0300
committerXhmikosR <xhmikosr@gmail.com>2019-07-25 10:41:13 +0300
commit1c05c1dbf11ad272c142b1007e2ded1aa5cf3d7b (patch)
treedc04bd84bc16f5324e92bff1bc1306436529d6df /scss/_functions.scss
parent172d580db37a24d8f564acc5ae4deb811ba85699 (diff)
Drop `color()`, `theme-color()` & `gray()` functions (#29083)
Drop `color()`, `theme-color()` & `gray()` functions in favor of variables. The functions just called a `map-get()` of a map where just the variables were defined. Also the `theme-color-level()` now accepts any color you want instead of only `$theme-colors` colors. The first value now is a variable instead of the `$theme-colors` key.
Diffstat (limited to 'scss/_functions.scss')
-rw-r--r--scss/_functions.scss18
1 files changed, 2 insertions, 16 deletions
diff --git a/scss/_functions.scss b/scss/_functions.scss
index 811ca62800..c9edfff42a 100644
--- a/scss/_functions.scss
+++ b/scss/_functions.scss
@@ -93,22 +93,8 @@
@return if($yiq >= $yiq-contrasted-threshold, $dark, $light);
}
-// Retrieve color Sass maps
-@function color($key: "blue") {
- @return map-get($colors, $key);
-}
-
-@function theme-color($key: "primary") {
- @return map-get($theme-colors, $key);
-}
-
-@function gray($key: "100") {
- @return map-get($grays, $key);
-}
-
-// Request a theme color level
-@function theme-color-level($color-name: "primary", $level: 0) {
- $color: theme-color($color-name);
+// Request a color level
+@function color-level($color: $primary, $level: 0) {
$color-base: if($level > 0, $black, $white);
$level: abs($level);