[libadwaita/wip/snwh/linked-button-fixes] buttons: simplify the transform effect



commit b676b79586d051e03b0da9dad7e6203f06a5ed80
Author: Sam Hewitt <sam snwh org>
Date:   Tue Nov 2 21:04:05 2021 -0230

    buttons: simplify the transform effect

 src/stylesheet/widgets/_buttons.scss | 15 +++++++++------
 src/stylesheet/widgets/_linked.scss  |  8 --------
 2 files changed, 9 insertions(+), 14 deletions(-)
---
diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss
index e9e5a198..953b356a 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -34,16 +34,14 @@ button {
       &.keyboard-activating,
       &:active {
         background-color: $button_active_color;
-        box-shadow: none;
         box-shadow:inset 0 2px 0 rgba(0,0,0,.1);
-        > label,
-        > image {
-          transform: translateY(1px);
-        }
+        > * {transform: translateY(1px);}
       }
 
       &:checked {
         background-color: $button_checked_color;
+        box-shadow:inset 0 2px 0 rgba(0,0,0,.1);
+        > * {transform: translateY(1px);}
 
         &:hover {
           background-color: $button_checked_hover_color;
@@ -516,7 +514,6 @@ splitbutton {
     border-bottom-left-radius: 0;
     margin-left: -1px;
   }
-
   @at-root %flat_split_button,
   &.flat {
     > separator {
@@ -546,6 +543,12 @@ splitbutton {
       @extend %button_basic_flat;
 
       border-radius: $button_radius;
+
+      &:active,
+      &:checked {
+        box-shadow:inset 0 2px 0 rgba(0,0,0,.1);
+        > * {transform: translateY(1px);}
+      }
     }
   }
 
diff --git a/src/stylesheet/widgets/_linked.scss b/src/stylesheet/widgets/_linked.scss
index 11f3e4d1..1e29c3bc 100644
--- a/src/stylesheet/widgets/_linked.scss
+++ b/src/stylesheet/widgets/_linked.scss
@@ -25,14 +25,6 @@ $_linked_widgets: ("%button",          ""),
         border-top-right-radius: 0;
         border-bottom-right-radius: 0;
       }
-
-      &:checked {
-        box-shadow:inset 0 2px 0 rgba(0,0,0,.1);
-        > label,
-        > image{
-          transform: translateY(1px);
-        }
-      }
     }
   }
 


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