[libadwaita/wip/exalm/stylesheet2: 59/97] stylesheet: Split spinner styles into a separate file




commit 532a7fa72dbda081a8df9ff696f00c1a94beda3c
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Apr 9 12:42:47 2021 +0500

    stylesheet: Split spinner styles into a separate file

 src/stylesheet/_common.scss          | 21 ---------------------
 src/stylesheet/_widgets.scss         |  1 +
 src/stylesheet/meson.build           |  1 +
 src/stylesheet/widgets/_spinner.scss | 16 ++++++++++++++++
 4 files changed, 18 insertions(+), 21 deletions(-)
---
diff --git a/src/stylesheet/_common.scss b/src/stylesheet/_common.scss
index 52912b7..88743be 100644
--- a/src/stylesheet/_common.scss
+++ b/src/stylesheet/_common.scss
@@ -185,27 +185,6 @@ window.aboutdialog image.large-icons {
   background-clip: padding-box;
 }
 
-
-/*********************
- * Spinner Animation *
- *********************/
-@keyframes spin {
-  to { transform: rotate(1turn); }
-}
-
-spinner {
-  background: none;
-  opacity: 0; // non spinning spinner makes no sense
-  -gtk-icon-source: -gtk-icontheme('process-working-symbolic');
-
-  &:checked {
-    opacity: 1;
-    animation: spin 1s linear infinite;
-
-    &:disabled { opacity: 0.5; }
-  }
-}
-
 /**********************
  * General Typography *
  **********************/
diff --git a/src/stylesheet/_widgets.scss b/src/stylesheet/_widgets.scss
index 75179c7..b343707 100644
--- a/src/stylesheet/_widgets.scss
+++ b/src/stylesheet/_widgets.scss
@@ -1 +1,2 @@
 @import 'widgets/buttons';
+@import 'widgets/spinner';
diff --git a/src/stylesheet/meson.build b/src/stylesheet/meson.build
index 5b02159..a512ff7 100644
--- a/src/stylesheet/meson.build
+++ b/src/stylesheet/meson.build
@@ -21,6 +21,7 @@ if not fs.exists('Adwaita-light.css')
       '_widgets.scss',
 
       'widgets/_buttons.scss',
+      'widgets/_spinner.scss',
     ])
 
     theme_variants = [
diff --git a/src/stylesheet/widgets/_spinner.scss b/src/stylesheet/widgets/_spinner.scss
new file mode 100644
index 0000000..ee38a79
--- /dev/null
+++ b/src/stylesheet/widgets/_spinner.scss
@@ -0,0 +1,16 @@
+@keyframes spin {
+  to { transform: rotate(1turn); }
+}
+
+spinner {
+  background: none;
+  opacity: 0; // non spinning spinner makes no sense
+  -gtk-icon-source: -gtk-icontheme('process-working-symbolic');
+
+  &:checked {
+    opacity: 1;
+    animation: spin 1s linear infinite;
+
+    &:disabled { opacity: 0.5; }
+  }
+}


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