feat: Replace deprecated sass things

- Global built-in functions
- Color functions
This commit is contained in:
sthag 2025-10-25 08:59:09 +02:00
parent 225c1dd55c
commit b739ddefda
13 changed files with 96 additions and 81 deletions

View file

@ -1,13 +1,16 @@
@use "sass:map";
@use "sass:color";
@function createColorMap($color, $percentage, $opacity) {
$map: (
base: $color,
light: lighten($color, $percentage),
dark: darken($color, $percentage),
trans: transparentize($color, $opacity)
light: color.scale($color, $lightness: $percentage),
dark: color.scale($color, $lightness: -$percentage),
trans: color.adjust($color, $alpha: -$opacity)
);
@return $map;
}
@function basic_color($key: 'alpha') {
@return map-get($color_palette, $key);
@return map.get($color_palette, $key);
}