[libadwaita/wip/exalm/background-colors: 13/20] stylesheet: Simplify transition shadow




commit 80e620320f163391263a2c921eda1f1d4bbff5a7
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Oct 18 14:03:52 2021 +0500

    stylesheet: Simplify transition shadow
    
    Reduce the number of explicit light/dark differences.

 src/stylesheet/widgets/_transition-shadow.scss | 31 +++++++-------------------
 1 file changed, 8 insertions(+), 23 deletions(-)
---
diff --git a/src/stylesheet/widgets/_transition-shadow.scss b/src/stylesheet/widgets/_transition-shadow.scss
index 43fbab44..f150b900 100644
--- a/src/stylesheet/widgets/_transition-shadow.scss
+++ b/src/stylesheet/widgets/_transition-shadow.scss
@@ -1,34 +1,25 @@
-$leaflet_dimming: rgba(0, 0, 0, if($variant == 'light', 0.12, 0.24));
-$leaflet_border: rgba(0, 0, 0, if($variant == 'light', 0.05, 0.2));
-$leaflet_outline: rgba(255, 255, 255, if($variant == 'light', 0.2, 0.05));
-
-@if $contrast == 'high' {
-  $leaflet_border: $borders_color;
-  $leaflet_outline: transparent;
-}
-
 @mixin background-shadow($direction) {
   background-image:
     linear-gradient($direction,
-                    rgba(0, 0, 0, if($variant == 'light', 0.05, 0.1)),
-                    rgba(0, 0, 0, if($variant == 'light', 0.01, 0.02)) 40px,
-                    rgba(0, 0, 0, 0) 56px),
+                    gtkalpha($shade_color, 0.7),
+                    gtkalpha($shade_color, 0.14) 40px,
+                    gtkalpha($shade_color, 0) 56px),
     linear-gradient($direction,
-                    rgba(0, 0, 0, if($variant == 'light', 0.03, 0.06)),
-                    rgba(0, 0, 0, if($variant == 'light', 0.01, 0.02)) 7px,
-                    rgba(0, 0, 0, 0) 24px);
+                    gtkalpha($shade_color, 0.4),
+                    gtkalpha($shade_color, 0.14) 7px,
+                    gtkalpha($shade_color, 0) 24px);
 }
 
 flap,
 leaflet {
   > dimming {
-    background: $leaflet_dimming;
+    background: $shade_color;
   }
 
   > border {
     min-width: 1px;
     min-height: 1px;
-    background: $leaflet_border;
+    background: gtkalpha(currentColor, if($contrast == 'high', .5, .1));
   }
 
   > shadow {
@@ -40,10 +31,4 @@ leaflet {
     &.up    { @include background-shadow(to bottom); }
     &.down  { @include background-shadow(to top); }
   }
-
-  > outline {
-    min-width: 1px;
-    min-height: 1px;
-    background: $leaflet_outline;
-  }
 }


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