[libadwaita/wip/exalms/tylesheet] stylesheet: Inline entry() mixin and remove it




commit 5e1fde45c29acbdea73aa7aaad5bdb75f1407b2b
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Oct 13 03:30:42 2021 +0500

    stylesheet: Inline entry() mixin and remove it

 src/stylesheet/_drawing.scss         | 39 ------------------------------------
 src/stylesheet/widgets/_entries.scss | 16 +++++++--------
 src/stylesheet/widgets/_labels.scss  |  3 ++-
 3 files changed, 10 insertions(+), 48 deletions(-)
---
diff --git a/src/stylesheet/_drawing.scss b/src/stylesheet/_drawing.scss
index 48108cb3..73e85ec3 100644
--- a/src/stylesheet/_drawing.scss
+++ b/src/stylesheet/_drawing.scss
@@ -25,45 +25,6 @@
   }
 }
 
-@mixin entry($t, $fc:$focus_border_color) {
-//
-// Entries drawing function
-//
-// $t: entry type
-// $fc: focus color
-//
-// possible $t values:
-// normal, insensitive, osd, osd-focus, block_cursor;
-//
-
-  @if $t==normal {
-    color: $text_color;
-    border-color: $borders_color;
-    background-color: $base_color;
-    // for the transition to work the number of shadows in different states needs to match, hence the 
transparent shadow here.
-  }
-  @if $t==insensitive {
-    filter: opacity(.5);
-  }
-  @if $t==osd {
-    color: $osd_text_color;
-    border-color: $borders_color;
-    background-color: transparentize(black, 0.5);
-    background-clip: padding-box;
-    box-shadow: none;
-  }
-  @if $t==osd-focus {
-    color: $osd_text_color;
-    border-color: $borders_color;
-    background-color: transparentize(black, 0.5);
-    background-clip: padding-box;
-  }
-  @if $t==block_cursor {
-    color: $base_color;
-    background-color: $text_color;
-  }
-}
-
 @mixin overshoot($p) {
 //
 // overshoot
diff --git a/src/stylesheet/widgets/_entries.scss b/src/stylesheet/widgets/_entries.scss
index 54610f23..f48e68aa 100644
--- a/src/stylesheet/widgets/_entries.scss
+++ b/src/stylesheet/widgets/_entries.scss
@@ -4,15 +4,15 @@ entry {
     min-height: 32px;
     padding-left: 8px;
     padding-right: 8px;
-    border: 1px solid;
+    border: 1px solid $borders_color;
     border-radius: $button_radius;
     border-spacing: 6px;
+    color: $text_color;
+    background-color: $base_color;
     background-clip: padding-box;
     transition: all 200ms $ease-out-quad;
     caret-color: currentColor;
 
-    @include entry(normal);
-
     @include focus-ring($focus-state: ':focus-within');
 
     > text {
@@ -21,7 +21,8 @@ entry {
       }
 
       > block-cursor {
-        @include entry(block_cursor);
+        color: $base_color;
+        background-color: $text_color;
       }
     }
 
@@ -35,7 +36,7 @@ entry {
       }
     }
 
-    &:disabled { @include entry(insensitive); }
+    &:disabled { filter: opacity(.5); }
 
     // entry error and warning style
     @each $e_type, $e_color in (error, $error_color),
@@ -76,9 +77,8 @@ entry {
     }
 
     .osd & {
-      @include entry(osd);
-
-      &:focus-within { @include entry(osd-focus); }
+      color: $osd_text_color;
+      background-color: transparentize(black, 0.5);
     }
   }
 
diff --git a/src/stylesheet/widgets/_labels.scss b/src/stylesheet/widgets/_labels.scss
index 6de7aca7..4c206ff9 100644
--- a/src/stylesheet/widgets/_labels.scss
+++ b/src/stylesheet/widgets/_labels.scss
@@ -84,5 +84,6 @@ label {
  *******************/
 
 editablelabel > stack > text {
-  @include entry(normal);
+  color: $text_color;
+  background-color: $base_color;
 }


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