[libadwaita/wip/exalm/card: 15/27] stylesheet: Add a .card style class
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/card: 15/27] stylesheet: Add a .card style class
- Date: Mon, 25 Oct 2021 13:21:56 +0000 (UTC)
commit 491ab4c49baa212de595c37d7cbc113ed5d6af4a
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 315ff059..df44ee21 100644
--- a/src/stylesheet/widgets/_misc.scss
+++ b/src/stylesheet/widgets/_misc.scss
@@ -117,3 +117,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]