[libadwaita/wip/exalm/status-page: 2/2] status-page: Add .compact style class




commit 79fa320462d911403387195f0e55dc6477e343fd
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Aug 4 00:17:23 2021 +0500

    status-page: Add .compact style class

 src/adw-status-page.c             |  3 +++
 src/stylesheet/widgets/_misc.scss | 36 ++++++++++++++++++++++++------------
 2 files changed, 27 insertions(+), 12 deletions(-)
---
diff --git a/src/adw-status-page.c b/src/adw-status-page.c
index 9d5a441e..4aaa3c63 100644
--- a/src/adw-status-page.c
+++ b/src/adw-status-page.c
@@ -20,6 +20,9 @@
  *
  * `AdwStatusPage` has a main CSS node with name `statuspage`.
  *
+ * `AdwStatusPage` can use the `.compact` style class for when it needs to fit
+ * into a small space such a sidebar or a popover.
+ *
  * Since: 1.0
  */
 
diff --git a/src/stylesheet/widgets/_misc.scss b/src/stylesheet/widgets/_misc.scss
index 7600d0cb..9d925a0e 100644
--- a/src/stylesheet/widgets/_misc.scss
+++ b/src/stylesheet/widgets/_misc.scss
@@ -67,23 +67,35 @@ statusbar {
  * AdwStatusPage *
  *****************/
 
-statuspage > scrolledwindow > viewport > box {
-  margin: 36px 12px;
-  border-spacing: 36px;
+statuspage {
+  > scrolledwindow > viewport > box {
+    margin: 36px 12px;
+    border-spacing: 36px;
 
-  > clamp > box {
-    border-spacing: 12px;
+    > clamp > box {
+      border-spacing: 12px;
 
-    > .icon {
-      -gtk-icon-size: 128px;
+      > .icon {
+        -gtk-icon-size: 128px;
 
-      @if $contrast == 'normal' {
-        color: gtkalpha(currentColor, 0.5);
-      }
+        @if $contrast == 'normal' {
+          color: gtkalpha(currentColor, 0.5);
+        }
 
-      &:not(:last-child) {
-        margin-bottom: 24px;
+        &:not(:last-child) {
+          margin-bottom: 24px;
+        }
       }
     }
   }
+
+  &.compact > scrolledwindow > viewport > box > clamp > box {
+    > .icon {
+      -gtk-icon-size: 96px;
+    }
+
+    > .title {
+      font-size: 18pt;
+    }
+  }
 }


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