[libadwaita/wip/exalm/accent: 3/16] stylesheet: Rework filled button states again




commit d47a249beb8c0f2aeaf08a36af2f4ccc0c8063c1
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Jun 11 23:08:16 2021 +0500

    stylesheet: Rework filled button states again
    
    Make hover lighter and the other states darker.

 src/stylesheet/widgets/_buttons.scss | 35 +++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)
---
diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss
index 64149e8d..4ad12343 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -101,19 +101,19 @@ button {
     &.keyboard-activating,
     &:active {
       color: white;
-      background-color: lighten($osd_bg_color, 20%);
+      background-color: darken($osd_bg_color, 20%);
     }
 
     &:checked {
-      background-color: lighten($osd_bg_color, 15%);
+      background-color: darken($osd_bg_color, 15%);
 
       &:hover {
-        background-color: lighten($osd_bg_color, 25%);
+        background-color: darken($osd_bg_color, 5%);
       }
 
       &.keyboard-activating,
       &:active {
-        background-color: lighten($osd_bg_color, 30%);
+        background-color: darken($osd_bg_color, 30%);
       }
     }
 
@@ -128,7 +128,10 @@ button {
                              (destructive-action, $destructive_color) {
     &.#{$b_type} {
       color: white;
-      background-color: $b_color;
+
+      &, &:checked {
+        background-color: $b_color;
+      }
 
       box-shadow: none;
 
@@ -136,24 +139,24 @@ button {
       transition: $button_transition;
 
       &:hover {
-        background-color: shade($b_color, 0.95);
+        background-image: image(#{"alpha(currentColor, .1)"});
       }
 
       &.keyboard-activating,
       &:active {
-        background-color: shade($b_color, 0.8);
+        background-image: image(transparentize(black, .8));
       }
 
       &:checked {
-        background-color: shade($b_color, 0.85);
+        background-image: image(transparentize(black, .85));
 
         &:hover {
-          background-color: shade($b_color, 0.8);
+          background-image: image(transparentize(black, .95));
         }
 
         &.keyboard-activating,
         &:active {
-          background-color: shade($b_color, 0.7);
+          background-image: image(transparentize(black, .7));
         }
       }
     }
@@ -161,7 +164,7 @@ button {
 
   @at-root %button_basic_flat,
   &.flat {
-    background-color: transparent;
+    background: transparent;
     @include focus-ring();
     transition: $button_transition;
 
@@ -177,24 +180,24 @@ button {
     }
 
     &:hover {
-      background-color: $view_hover_color;
+      background: $view_hover_color;
     }
 
     &.keyboard-activating,
     &:active {
-      background-color: $view_active_color;
+      background: $view_active_color;
     }
 
     &:checked {
-      background-color: $view_selected_color;
+      background: $view_selected_color;
 
       &:hover {
-        background-color: $view_selected_hover_color;
+        background: $view_selected_hover_color;
       }
 
       &.keyboard-activating,
       &:active {
-        background-color: $view_selected_active_color;
+        background: $view_selected_active_color;
       }
     }
 


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