⚠ define-color()

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.ccc

// @deprecated
// The mixin defines CSS variable color in hsla form, by splitting it in four CSS
// variables.
@mixin define-color($name, $color, $prefix: $var-prefix, $alpha: -1) {
  @warn 'define-color() mixin is deprecated in favor of set-color(), which includes new customizations';
  @include set-var($name, hue($color), $prefix, 'h');
  @include set-var($name, saturation($color), $prefix, 's');
  @include set-var($name, lightness($color), $prefix, 'l');
  @if $alpha == -1 {
    @include set-var($name, alpha($color), $prefix, 'a');
  } @else {
    @include set-var($name, $alpha, $prefix, 'a');

Last updated