Skip to content

Commit

Permalink
Fix sass deprecation warning (mastodon#31961)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored Sep 18, 2024
1 parent 8b70834 commit 29656cb
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions app/javascript/styles/mastodon-light/variables.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use 'sass:color';

// Dependent colors
$black: #000000;
$white: #ffffff;
Expand Down Expand Up @@ -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';
Expand Down

0 comments on commit 29656cb

Please sign in to comment.