[libadwaita/wip/exalm/exclusive-toggles: 2/6] stylesheet: Move needs-attention styles to _common.scss




commit a22456888a50d83f6aa47919d386d153affb3bb8
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sat Sep 11 22:45:21 2021 +0500

    stylesheet: Move needs-attention styles to _common.scss

 src/stylesheet/_common.scss          | 25 +++++++++++++++++++++++++
 src/stylesheet/widgets/_buttons.scss | 26 --------------------------
 2 files changed, 25 insertions(+), 26 deletions(-)
---
diff --git a/src/stylesheet/_common.scss b/src/stylesheet/_common.scss
index 52d21d1a..a261f65d 100644
--- a/src/stylesheet/_common.scss
+++ b/src/stylesheet/_common.scss
@@ -79,4 +79,29 @@ expander-widget {
       -1px 0 rgba(0,0,0,0.1);
 }
 
+@keyframes needs_attention {
+  from { background-image: radial-gradient(farthest-side, $accent_bg_color 0%, transparent 0%); }
+  to { background-image: radial-gradient(farthest-side, $accent_bg_color 95%, transparent); }
+}
+
+%needs_attention {
+  // the dot is drawn by using two radial gradient, the first one is the actual dot, the other
+  // simulates the shadow labels and icons normally have in buttons.
+  animation: needs_attention 150ms ease-in;
+
+  background-image: radial-gradient(farthest-side, $accent_bg_color 96%, transparent);
+  background-size: 6px 6px, 6px 6px;
+  background-repeat: no-repeat;
+
+  @if $variant == 'light' { background-position: right 3px, right 4px; }
+
+  @else { background-position: right 3px, right 2px; }
+
+  &:dir(rtl) {
+    @if $variant == 'light' { background-position: left 3px, left 4px; }
+
+    @else { background-position: left 3px, left 2px; }
+  }
+}
+
 @import 'widgets';
diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss
index 823990d4..c56d97ce 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -1,9 +1,3 @@
-// stuff for .needs-attention
-@keyframes needs_attention {
-  from { background-image: radial-gradient(farthest-side, $accent_bg_color 0%, transparent 0%); }
-  to { background-image: radial-gradient(farthest-side, $accent_bg_color 95%, transparent); }
-}
-
 %button,
 button {
   @at-root %button_basic, & {
@@ -290,26 +284,6 @@ button {
   }
 }
 
-%needs_attention {
-  // the dot is drawn by using two radial gradient, the first one is the actual dot, the other
-  // simulates the shadow labels and icons normally have in buttons.
-  animation: needs_attention 150ms ease-in;
-
-  background-image: radial-gradient(farthest-side, $accent_bg_color 96%, transparent);
-  background-size: 6px 6px, 6px 6px;
-  background-repeat: no-repeat;
-
-  @if $variant == 'light' { background-position: right 3px, right 4px; }
-
-  @else { background-position: right 3px, right 2px; }
-
-  &:dir(rtl) {
-    @if $variant == 'light' { background-position: left 3px, left 4px; }
-
-    @else { background-position: left 3px, left 2px; }
-  }
-}
-
 %undecorated_button {
   background-color: transparent;
 }


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