From 29656cb9e0e5fbecdec5bc5f4e8fc2249e1b8c4e Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 18 Sep 2024 19:39:32 +0200 Subject: [PATCH] Fix sass deprecation warning (#31961) --- .../styles/mastodon-light/variables.scss | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/javascript/styles/mastodon-light/variables.scss b/app/javascript/styles/mastodon-light/variables.scss index 76ede2623..76bdc4022 100644 --- a/app/javascript/styles/mastodon-light/variables.scss +++ b/app/javascript/styles/mastodon-light/variables.scss @@ -1,3 +1,5 @@ +@use 'sass:color'; + // Dependent colors $black: #000000; $white: #ffffff; @@ -47,11 +49,19 @@ $account-background-color: $white !default; // Invert darkened and lightened colors @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) { - @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';