[libadwaita] stylesheet: Use palette colors instead of magic values



commit 432844af58cc28cfa1f757ce285f5ce9c3be7abc
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Wed Jun 16 14:55:25 2021 +0200

    stylesheet: Use palette colors instead of magic values

 src/stylesheet/_colors.scss   |  8 ++++----
 src/stylesheet/_defaults.scss | 16 ++++++++--------
 2 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/stylesheet/_colors.scss b/src/stylesheet/_colors.scss
index 74414c0d..7aab2984 100644
--- a/src/stylesheet/_colors.scss
+++ b/src/stylesheet/_colors.scss
@@ -10,9 +10,9 @@ $success_color: gtkcolor(success_color);
 $warning_color: gtkcolor(warning_color);
 $error_color: gtkcolor(error_color);
 
-$base_color: if($variant == 'light', #ffffff, lighten(desaturate(#241f31, 100%), 2%));
+$base_color: if($variant == 'light', $light_1, lighten(desaturate($dark_4, 100%), 2%));
 $text_color: if($variant == 'light', black, white);
-$bg_color: if($variant == 'light', #f6f5f4, darken(desaturate(#3d3846, 100%), 4%));
+$bg_color: if($variant == 'light', $light_2, darken(desaturate($dark_3, 100%), 4%));
 $fg_color: if($variant == 'light', #2e3436, #eeeeec);
 
 $accent_standalone_color: gtkmix($accent_color, $text_color, if($variant == 'dark', 50%, 75%));
@@ -59,7 +59,7 @@ $scrollbar_slider_active_color: $accent_color;
 
 $osd_fg_color: #eeeeec;
 $osd_text_color: white;
-$osd_bg_color: if($variant == 'light', transparentize(darken(desaturate(#3d3846, 100%), 4%),0.3), 
transparentize(darken(desaturate(#3d3846, 100%), 10%),0.3));
+$osd_bg_color: if($variant == 'light', transparentize(darken(desaturate($dark_3, 100%), 4%),0.3), 
transparentize(darken(desaturate($dark_3, 100%), 10%),0.3));
 $osd_insensitive_bg_color: transparentize(mix($osd_fg_color, opacify($osd_bg_color, 1), 10%), 0.5);
 $osd_insensitive_fg_color: mix($osd_fg_color, opacify($osd_bg_color, 1), 50%);
 $osd_borders_color: transparentize(black, 0.3);
@@ -69,7 +69,7 @@ $sidebar_bg_color: mix($bg_color, $base_color, 50%);
 $tooltip_borders_color: transparentize(white, 0.9);
 $shadow_color: transparentize(black, 0.9);
 
-$drop_target_color: if($variant == 'light', #2ec27e, #26a269);
+$drop_target_color: if($variant == 'light', $green_4, $green_5);
 
 //insensitive state derived colors
 $insensitive_fg_color: mix($fg_color, $bg_color, 50%);
diff --git a/src/stylesheet/_defaults.scss b/src/stylesheet/_defaults.scss
index a441a457..add61fed 100644
--- a/src/stylesheet/_defaults.scss
+++ b/src/stylesheet/_defaults.scss
@@ -3,20 +3,20 @@
    use responsibly! */
 
 // Sass thinks we're using the colors in the variables as strings and may shoot
-// warning, it's innocuous and can be defeated by using "" + $var
+// warning, it's innocuous and can be defeated by using #{$var}.
 
 // These are the colors apps are can override. We define the defaults here and
 // define variables for them in _colors.scss
 
 // The main accent color and the matching text value
-@define-color accent_color #3584e4;
-@define-color accent_text #ffffff;
+@define-color accent_color #{$blue_3};
+@define-color accent_text #{$light_1};
 
 // destructive-action buttons
-@define-color destructive_color #e01b24;
-@define-color destructive_text #ffffff;
+@define-color destructive_color #{$red_3};
+@define-color destructive_text #{$light_1};
 
 // Levelbars, entries, labels and infobars. These don't need text colors
-@define-color success_color #33d17a;
-@define-color warning_color #e5a50a;
-@define-color error_color #e01b24;
+@define-color success_color #{$green_3};
+@define-color warning_color #{$yellow_5};
+@define-color error_color #{$red_3};


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]