forked from picturepan2/spectre
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ability(functions/color): use the
get-color-name()
function in the …
…`get-var-hue()` `get-var-saturation()` and `get-var-lightness()` functions to have the ability to pass the color code.
- Loading branch information
1 parent
49b8a57
commit 6b3d888
Showing
3 changed files
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
@use '../../../variables' as *; | ||
@use '../get-color-name.function' as *; | ||
|
||
// The function returns the CSS variable hue color of the given `$name` and `$prefix`. | ||
@function get-var-hue($name, $prefix: $var-prefix) { | ||
@return var(--#{$prefix}-#{$name}-#{$var-hue}); | ||
@return var(--#{$prefix}-#{get-color-name($name)}-#{$var-hue}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
@use '../../../variables' as *; | ||
@use '../get-color-name.function' as *; | ||
|
||
// The function returns the CSS variable lightness color of the given `$name` and `$prefix`. | ||
@function get-var-lightness($name, $prefix: $var-prefix) { | ||
@return var(--#{$prefix}-#{$name}-#{$var-lightness}); | ||
@return var(--#{$prefix}-#{get-color-name($name)}-#{$var-lightness}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
@use '../../../variables' as *; | ||
@use '../get-color-name.function' as *; | ||
|
||
// The function returns the CSS variable saturation color of the given `$name` and `$prefix`. | ||
@function get-var-saturation($name, $prefix: $var-prefix) { | ||
@return var(--#{$prefix}-#{$name}-#{$var-saturation}); | ||
@return var(--#{$prefix}-#{get-color-name($name)}-#{$var-saturation}); | ||
} |