feat: Replace deprecated sass things
- Global built-in functions - Color functions
This commit is contained in:
parent
225c1dd55c
commit
b739ddefda
13 changed files with 96 additions and 81 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue