diff options
author | Martijn Cuppens <martijn.cuppens@gmail.com> | 2019-07-25 10:41:13 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2019-07-25 10:41:13 +0300 |
commit | 1c05c1dbf11ad272c142b1007e2ded1aa5cf3d7b (patch) | |
tree | dc04bd84bc16f5324e92bff1bc1306436529d6df /scss/_functions.scss | |
parent | 172d580db37a24d8f564acc5ae4deb811ba85699 (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.scss | 18 |
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); |