[libadwaita/wip/exalm/window-border: 2/2] stylesheet: Add an outline for popovers




commit 7086762ddd96c0ba29cf6675b997ffe7f553f574
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Apr 26 20:45:47 2021 +0500

    stylesheet: Add an outline for popovers
    
    Same as the previous commit. Since outline can't work with arrow,
    approximate it with a border instead, and move the existing border into
    box-shadow.

 src/stylesheet/widgets/_popovers.scss | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/src/stylesheet/widgets/_popovers.scss b/src/stylesheet/widgets/_popovers.scss
index 7ad73bf..9335f80 100644
--- a/src/stylesheet/widgets/_popovers.scss
+++ b/src/stylesheet/widgets/_popovers.scss
@@ -10,6 +10,16 @@ popover.background {
     background-clip: padding-box;
     border: 1px solid $_popover_border;
     box-shadow: 0 1px 2px transparentize(black, 0.7);
+
+    @if $variant == 'dark' {
+      $_popover_outline: if($contrast=='high', transparentize(white, .7), transparentize(white, .9));
+
+      // Add an outline and move border to box-shadow instead
+      background-clip: border-box;
+      border-color: $_popover_outline;
+      box-shadow: 0 0 0 1px $_popover_border,
+                  0 1px 2px 1px transparentize(black, 0.7);
+    }
   }
 
   &:backdrop {


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