label-variant()
The mixin contains the color
and background
style of the values given respectively by $color
and $bg-color
CSS variable name. Both parameters can be passed as a two-index list where the second item in the list refers to the lightness, and parameter $bg-color
can be passed using the three-index list where the third item is a label background alpha.
For example $color: ('primary', -10%)
when font color primary
should be darker by 10%, and $bg-color: ('primary-dark', 10%)
when label background color is primary-dark
lighter by 10%
.
Parameters
$color: 'light-color'
$color: 'light-color'
A color name that exists as a CSS variable of a string or two-index list type is passed to the color()
function to set the foreground color value of a label's text. The first item of the two-index list refers to the CSS variable color name, and the second refers to its lightness.
$bg-color: 'primary-color'
$bg-color: 'primary-color'
A color name that exists as a CSS variable of a string or three-index list type is passed to the color()
function to set the background color of the label. The first item of the three-index list refers to the CSS variable color name, the second refers to its lightness, and the third refers to the alpha.
$color-lightness: 0%
$color-lightness: 0%
Optional alternative lightness attribute of the given $color
parameter.
$bg-lightness: 0%
$bg-lightness: 0%
Optional alternative lightness attribute of the given $bg-color
parameter.
Example usage
Last updated