⚠ define-color-based-on()
Deprecated: This feature is no longer recommended. Avoid using it, and update existing code if possible. Be aware that this feature may cease to work at any time.
// @deprecated
// Defines a color based on the specified CSS variable and its lightness.
@mixin define-color-based-on($name, $color, $lightness: 0%, $prefix: $var-prefix) {
@warn 'define-color-based-on() mixin is deprecated in favor of set-color()';
@include set-var($name, get-var($color, $suffix: 'h'), $prefix, 'h');
@include set-var($name, get-var($color, $suffix: 's'), $prefix, 's');
@include set-var($name, calc(var(--#{$prefix}-#{$color}-l) + #{$lightness}), $prefix, 'l');
@include set-var($name, get-var($color, $suffix: 'a'), $prefix, 'a');
}
Last updated