[libadwaita/wip/exalm/card: 1/2] stylesheet: Add a .card style class




commit 1665f7fd4c4c2734be6ae4a75e93a93918e79a0c
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue Oct 19 16:28:32 2021 +0500

    stylesheet: Add a .card style class
    
    theme_base/text_color aren't the go-to colors for making these anymore, we
    should provide a pre-built way to do it.
    
    Support .card.activatable to also have hover and active styles on cards.

 src/stylesheet/widgets/_misc.scss | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
---
diff --git a/src/stylesheet/widgets/_misc.scss b/src/stylesheet/widgets/_misc.scss
index 0644837e..40c829b0 100644
--- a/src/stylesheet/widgets/_misc.scss
+++ b/src/stylesheet/widgets/_misc.scss
@@ -119,3 +119,27 @@ statuspage {
     }
   }
 }
+
+/* Cards */
+
+.card {
+  background-color: $card_bg_color;
+  background-clip: padding-box;
+  color: $card_fg_color;
+  border: 1px solid $card_border_color;
+  border-radius: $card_radius;
+
+  @include focus-ring($offset: -1px);
+
+  &.activatable {
+    transition: $button_transition;
+
+    &:hover {
+      background-image: image(gtkalpha(currentColor, .03));
+    }
+
+    &:active {
+      background-image: image(gtkalpha(currentColor, .08));
+    }
+  }
+}


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