refactor: replace deprecated color functions to fix Sass warnings

This commit is contained in:
Lucas Larroche 2025-03-15 11:51:28 +07:00
parent 64bfd3d797
commit 0a77e6f335
240 changed files with 604 additions and 595 deletions

View file

@ -24,7 +24,8 @@
@function brightness($color) {
$color-brightness: round(
math.div(
(color.red($color) * 299) + (color.green($color) * 587) + (color.blue($color) * 114),
(color.channel($color, "red") * 299) + (color.channel($color, "green") * 587) +
(color.channel($color, "blue") * 114),
1000
)
);
@ -52,5 +53,8 @@
// Display color as RGB
@function display-rgb($color) {
@return unquote("rgb(" + red($color) + ", " + green($color) + ", " + blue($color) + ")");
@return unquote(
"rgb(" + color.channel($color, "red") + ", " + color.channel($color, "green") + ", " +
color.channel($color, "blue") + ")"
);
}

View file

@ -1,6 +1,11 @@
@use "sass:color";
// Display color as RGB
@function display-rgb($color) {
@return unquote("rgb(" + red($color) + ", " + green($color) + ", " + blue($color) + ")");
@return unquote(
"rgb(" + color.channel($color, "red") + ", " + color.channel($color, "green") + ", " +
color.channel($color, "blue") + ")"
);
}
// Generate a shadow layer