[libadwaita/wip/exalm/background-colors: 19/48] stylesheet: Inline button colors




commit eee636048acb9e5599cd3019e9b6c8b2c90caece
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Sep 1 02:51:02 2021 +0500

    stylesheet: Inline button colors
    
    Those variables are only used once.

 src/stylesheet/_colors.scss          |  7 -------
 src/stylesheet/widgets/_buttons.scss | 12 ++++++------
 2 files changed, 6 insertions(+), 13 deletions(-)
---
diff --git a/src/stylesheet/_colors.scss b/src/stylesheet/_colors.scss
index e700ddac..35bd7837 100644
--- a/src/stylesheet/_colors.scss
+++ b/src/stylesheet/_colors.scss
@@ -42,13 +42,6 @@ $trough_color: gtkalpha(currentColor, .15);
 $trough_hover_color: gtkalpha(currentColor, .2);
 $trough_active_color: gtkalpha(currentColor, .25);
 
-$button_color: gtkalpha(currentColor, .1);
-$button_hover_color: gtkalpha(currentColor, .15);
-$button_active_color: gtkalpha(currentColor, .25);
-$button_checked_color: gtkalpha(currentColor, .2);
-$button_checked_hover_color: gtkalpha(currentColor, .25);
-$button_checked_active_color: gtkalpha(currentColor, .35);
-
 $fill_color: $accent_bg_color;
 $fill_text_color: $accent_fg_color;
 $fill_hover_color: gtkmix($accent_bg_color, currentColor, 90%);
diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss
index dec5f229..9b1a2392 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -11,7 +11,7 @@ button {
     min-width: 16px;
     padding: 5px 10px;
     border-radius: $button_radius;
-    background-color: $button_color;
+    background-color: gtkalpha(currentColor, .1);
     font-weight: bold;
 
     @if $contrast == 'high' {
@@ -22,24 +22,24 @@ button {
     transition: $button_transition;
 
     &:hover {
-      background-color: $button_hover_color;
+      background-color: gtkalpha(currentColor, .15);
     }
 
     &.keyboard-activating,
     &:active {
-      background-color: $button_active_color;
+      background-color: gtkalpha(currentColor, .25);
     }
 
     &:checked {
-      background-color: $button_checked_color;
+      background-color: gtkalpha(currentColor, .2);
 
       &:hover {
-        background-color: $button_checked_hover_color;
+        background-color: gtkalpha(currentColor, .25);
       }
 
       &.keyboard-activating,
       &:active {
-        background-color: $button_checked_active_color;
+        background-color: gtkalpha(currentColor, .35);
       }
     }
 


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