mirror of
https://github.com/locomotivemtl/locomotive-boilerplate.git
synced 2026-01-15 00:55:08 +08:00
Update color function
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": 1675955478084
|
||||
"version": 1682069627576
|
||||
}
|
||||
@@ -149,14 +149,12 @@ $context: 'frontend' !default;
|
||||
// }
|
||||
// ```
|
||||
//
|
||||
// @param {string} $key - The color key in $colors
|
||||
// @return {function<string>} in hexadecimal
|
||||
// @param {string} $key - The color key in $colors.
|
||||
// @return {color}
|
||||
|
||||
@function color($key) {
|
||||
@if map-has-key($colors, $key) {
|
||||
@return map-get($colors, $key);
|
||||
@if not map-has-key($colors, $key) {
|
||||
@error "Unknown '#{$key}' in $colors.";
|
||||
}
|
||||
|
||||
@warn "Unkown '#{$key}' in $colors.";
|
||||
|
||||
@return null;
|
||||
@return map-get($colors, $key);
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user