[Glitch] Fix sass deprecation warning

Port 29656cb9e0 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
pull/2850/head
Eugen Rochko 2024-09-18 19:39:32 +02:00 committed by Claire
parent d77348f830
commit 80cb285819
1 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,5 @@
@use 'sass:color';
// Dependent colors // Dependent colors
$black: #000000; $black: #000000;
$white: #ffffff; $white: #ffffff;
@ -47,11 +49,19 @@ $account-background-color: $white !default;
// Invert darkened and lightened colors // Invert darkened and lightened colors
@function darken($color, $amount) { @function darken($color, $amount) {
@return hsl(hue($color), saturation($color), lightness($color) + $amount); @return hsl(
hue($color),
color.channel($color, 'saturation', $space: hsl),
color.channel($color, 'lightness', $space: hsl) + $amount
);
} }
@function lighten($color, $amount) { @function lighten($color, $amount) {
@return hsl(hue($color), saturation($color), lightness($color) - $amount); @return hsl(
hue($color),
color.channel($color, 'saturation', $space: hsl),
color.channel($color, 'lightness', $space: hsl) - $amount
);
} }
$emojis-requiring-inversion: 'chains'; $emojis-requiring-inversion: 'chains';