[libadwaita/wip/exalm/backdrop] stylesheet: Inline headerbar_fill()



commit 8797052ef9510e013a5c0fe62487b0e7c3fe4cbf
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Apr 30 17:33:22 2021 +0500

    stylesheet: Inline headerbar_fill()
    
    It's only used once and it's very simple, there's no good reason to keep
    it.

 src/stylesheet/_drawing.scss            | 16 ----------------
 src/stylesheet/widgets/_header-bar.scss | 11 +++++++++--
 2 files changed, 9 insertions(+), 18 deletions(-)
---
diff --git a/src/stylesheet/_drawing.scss b/src/stylesheet/_drawing.scss
index 1c1a842..da6ff09 100644
--- a/src/stylesheet/_drawing.scss
+++ b/src/stylesheet/_drawing.scss
@@ -275,22 +275,6 @@ $_default_button_c: lighten($bg_color,2%);
   }
 }
 
-@mixin headerbar_fill($c:$headerbar_bg_color, $ov: none) {
-//
-// headerbar fill
-//
-// $c:  base color
-// $ov: a background layer for background shorthand (hence no commas!)
-//
-  $gradient: linear-gradient(to top, darken($c, 2%), lighten($c, 1%));
-
-  @if $variant == 'dark' { $gradient: linear-gradient(to top, lighten($c, 4%), lighten($c, 6%)); }
-
-  @if $ov != none { background: $c $ov, $gradient; }
-  @else { background: $c $gradient; }
-
-}
-
 @mixin overshoot($p, $c:$fg_color) {
 //
 // overshoot
diff --git a/src/stylesheet/widgets/_header-bar.scss b/src/stylesheet/widgets/_header-bar.scss
index d9c77d8..e89a6dc 100644
--- a/src/stylesheet/widgets/_header-bar.scss
+++ b/src/stylesheet/widgets/_header-bar.scss
@@ -6,6 +6,15 @@ headerbar {
   border-color: $alt_borders_color;
   border-radius: 0;
 
+  $_header_bar_color: darken($bg_color, 10%);
+
+  @if $variant == 'dark' {
+    background-image: linear-gradient(to top, lighten($_header_bar_color, 4%), lighten($_header_bar_color, 
6%));
+  }
+  @else {
+    background-image: linear-gradient(to top, darken($_header_bar_color, 2%), lighten($_header_bar_color, 
1%));
+  }
+
   > windowhandle > box {
     &,
     > box.start,
@@ -14,8 +23,6 @@ headerbar {
     }
   }
 
-  @include headerbar_fill(darken($bg_color, 10%));
-
   &:backdrop {
     background-color: $bg_color;
     background-image: none;


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