[libadwaita/wip/exalm/stylesheet2: 95/97] stylesheet: Split preferences styles to a separate file




commit bbeef7c15408f403bc1f1db1efcb737ee9178b8d
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Apr 9 16:59:56 2021 +0500

    stylesheet: Split preferences styles to a separate file

 src/stylesheet/_custom.scss              | 33 --------------------------------
 src/stylesheet/_widgets.scss             |  1 +
 src/stylesheet/meson.build               |  1 +
 src/stylesheet/widgets/_preferences.scss | 30 +++++++++++++++++++++++++++++
 4 files changed, 32 insertions(+), 33 deletions(-)
---
diff --git a/src/stylesheet/_custom.scss b/src/stylesheet/_custom.scss
index 053f3ed..6f7b148 100644
--- a/src/stylesheet/_custom.scss
+++ b/src/stylesheet/_custom.scss
@@ -74,36 +74,3 @@ leaflet {
     background: $leaflet_outline;
   }
 }
-
-// Preferences
-
-window.preferences > contents > leaflet > box > stack > stack > scrolledwindow > viewport > clamp > list,
-preferencespage > scrolledwindow > viewport > clamp > box {
-  margin: 0 12px;
-
-  transition: margin-bottom 200ms ease,
-              margin-top 200ms ease,
-              border-spacing 200ms ease;
-
-  $sizes: ("small": 18px, "medium": 24px, "large": 30px);
-
-  @each $name, $size in $sizes {
-    &.#{$name} {
-      margin-top: $size;
-      margin-bottom: $size;
-      border-spacing: $size;
-    }
-  }
-}
-
-preferencesgroup > box {
-  // Add space between the description and the title.
-  > label:not(:first-child) {
-    margin-top: 6px;
-  }
-
-  // Add space between the box and the labels.
-  > box:not(:first-child) {
-    margin-top: 12px;
-  }
-}
diff --git a/src/stylesheet/_widgets.scss b/src/stylesheet/_widgets.scss
index cf31ba8..9d8649c 100644
--- a/src/stylesheet/_widgets.scss
+++ b/src/stylesheet/_widgets.scss
@@ -19,6 +19,7 @@
 @import 'widgets/notebook';
 @import 'widgets/paned';
 @import 'widgets/popovers';
+@import 'widgets/preferences';
 @import 'widgets/progress-bar';
 @import 'widgets/scale';
 @import 'widgets/scrolling';
diff --git a/src/stylesheet/meson.build b/src/stylesheet/meson.build
index ce2c5d8..cf503d3 100644
--- a/src/stylesheet/meson.build
+++ b/src/stylesheet/meson.build
@@ -41,6 +41,7 @@ if not fs.exists('Adwaita-light.css')
       'widgets/_notebook.scss',
       'widgets/_paned.scss',
       'widgets/_popovers.scss',
+      'widgets/_preferences.scss',
       'widgets/_progress-bar.scss',
       'widgets/_scale.scss',
       'widgets/_scrolling.scss',
diff --git a/src/stylesheet/widgets/_preferences.scss b/src/stylesheet/widgets/_preferences.scss
new file mode 100644
index 0000000..6af76a5
--- /dev/null
+++ b/src/stylesheet/widgets/_preferences.scss
@@ -0,0 +1,30 @@
+window.preferences > contents > leaflet > box > stack > stack > scrolledwindow > viewport > clamp > list,
+preferencespage > scrolledwindow > viewport > clamp > box {
+  margin: 0 12px;
+
+  transition: margin-bottom 200ms ease,
+              margin-top 200ms ease,
+              border-spacing 200ms ease;
+
+  $sizes: ("small": 18px, "medium": 24px, "large": 30px);
+
+  @each $name, $size in $sizes {
+    &.#{$name} {
+      margin-top: $size;
+      margin-bottom: $size;
+      border-spacing: $size;
+    }
+  }
+}
+
+preferencesgroup > box {
+  // Add space between the description and the title.
+  > label:not(:first-child) {
+    margin-top: 6px;
+  }
+
+  // Add space between the box and the labels.
+  > box:not(:first-child) {
+    margin-top: 12px;
+  }
+}


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