lighten
Makes $color
lighter.
The $amount
must be a number between 0%
and 100%
(inclusive). Increases the HSL lightness of $color
by that amount.
⚠️ Heads up!
The lighten()
function increases lightness by a fixed amount, which is often not the desired effect. To make a color a certain percentage lighter than it was before, use scale()
instead.
Because lighten()
is usually not the best way to make a color lighter, it’s not included directly in the new module system. However, if you have to preserve the existing behavior, lighten($color, $amount)
can be written adjust($color, $lightness: $amount)
.
SCSS SYNTAX
最后更新于