[libadwaita/wip/exalm/card: 26/27] stylesheet: Allow .card on buttons as well




commit 1f285d91a7201d8b69455fa16d8d68baea0002f8
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Oct 22 21:04:47 2021 +0500

    stylesheet: Allow .card on buttons as well

 src/stylesheet/widgets/_buttons.scss | 36 ++++++++++++++++++++++++++++++++++++
 src/stylesheet/widgets/_misc.scss    |  2 +-
 2 files changed, 37 insertions(+), 1 deletion(-)
---
diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss
index 0e41c27b..425adf72 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -295,6 +295,42 @@ button {
     padding: 10px 32px;
     border-radius: 9999px;
   }
+
+  &.card {
+    background-color: $card_bg_color;
+    background-clip: padding-box;
+    font-weight: inherit;
+    box-shadow: none;
+    padding: 0;
+
+    transition: $button_transition;
+
+    &:hover {
+      background-image: image(gtkalpha(currentColor, .03));
+    }
+
+    &.keyboard-activating,
+    &:active {
+      background-image: image(gtkalpha(currentColor, .08));
+    }
+
+    &:checked {
+      background-color: $card_bg_color;
+      background-image: image($view_selected_color);
+
+      &:hover { background-image: image($view_selected_hover_color); }
+
+      &.keyboard-activating,
+      &:active { background-image: image($view_selected_active_color); }
+
+      &.has-open-popup { background-image: image($view_selected_hover_color); }
+    }
+
+    &:drop(active) {
+      color: $drop_target_color;
+      box-shadow: inset 0 0 0 1px $drop_target_color;
+    }
+  }
 }
 
 %undecorated_button {
diff --git a/src/stylesheet/widgets/_misc.scss b/src/stylesheet/widgets/_misc.scss
index df44ee21..fbf5fdd6 100644
--- a/src/stylesheet/widgets/_misc.scss
+++ b/src/stylesheet/widgets/_misc.scss
@@ -127,7 +127,7 @@ statuspage {
   border: 1px solid $card_border_color;
   border-radius: $card_radius;
 
-  @include focus-ring($offset: -1px);
+  @include focus-ring($offset: -2px);
 
   &.activatable {
     transition: $button_transition;


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