[libadwaita/wip/snwh/linked-button-fixes] buttons: indent style for active and checked linked buttons




commit a505c38139454b542f226a96d4762a866f42709e
Author: Sam Hewitt <sam snwh org>
Date:   Tue Nov 2 17:54:14 2021 -0230

    buttons: indent style for active and checked linked buttons

 src/stylesheet/widgets/_buttons.scss | 13 ++++++++++---
 src/stylesheet/widgets/_linked.scss  |  8 ++++++++
 2 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss
index 6941d512..e9e5a198 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -15,7 +15,7 @@ button {
     padding: 5px 10px;
     border-radius: $button_radius;
     font-weight: bold;
-    box-shadow: 0 1px 1px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.1);
+    box-shadow: inset 0 0 0 1px gtkalpha($border_color, .1);
 
     @include focus-ring();
     transition: $button_transition;
@@ -34,11 +34,16 @@ 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);
+        }
       }
 
       &:checked {
         background-color: $button_checked_color;
-        box-shadow: none;
 
         &:hover {
           background-color: $button_checked_hover_color;
@@ -55,6 +60,7 @@ button {
     &:disabled {
       filter: opacity($disabled_opacity);
 
+
       label {
         filter: none;
       }
@@ -152,7 +158,7 @@ button {
   }
 
   @at-root %opaque_button {
-    box-shadow: none; /* dark bg with dropshadow looks odd */
+    // box-shadow: none; /* dark bg with dropshadow looks odd */
 
     @include focus-ring($outer: true, $offset: 1px);
     transition: $button_transition;
@@ -183,6 +189,7 @@ button {
   &.opaque {
     @extend %opaque_button;
 
+
     background-color: $opaque_button_default_bg;
     color: $window_fg_color;
   }
diff --git a/src/stylesheet/widgets/_linked.scss b/src/stylesheet/widgets/_linked.scss
index 1e29c3bc..11f3e4d1 100644
--- a/src/stylesheet/widgets/_linked.scss
+++ b/src/stylesheet/widgets/_linked.scss
@@ -25,6 +25,14 @@ $_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]