[gnome-shell-sass] style: Handle sections in submenus



commit 5287bcd399217bdf05b22b717629fe708a38fb98
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Jan 25 15:47:23 2022 +0100

    style: Handle sections in submenus
    
    If a menu item in a submenu is part of a section, it should have
    rounded bottom corners if both the item and the section are the
    last child of its respective parent.
    
    To express that, add a new .popup-menu-section class and use that
    to undo/redo the rounding for items inside a section.
    
    It would be possible to do without a new class with a selector like
    
     > StBoxLayout > .popup-menu-item:last-child:hover,
     :last-child > .popup-menu-item:last-child:hover
    
    but that's hardly better with its heavy reliance on implementation
    details.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4940
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2126>

 widgets/_popovers.scss | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/widgets/_popovers.scss b/widgets/_popovers.scss
index f523ec6..3ddca4f 100644
--- a/widgets/_popovers.scss
+++ b/widgets/_popovers.scss
@@ -139,6 +139,13 @@
       border-radius: 0 0 $base_border_radius $base_border_radius;
     }
   }
+
+  .popup-menu-section {
+    .popup-menu-item:last-child:hover { border-radius: 0 }
+    &:last-child .popup-menu-item:last-child:hover {
+      border-radius: 0 0 $base_border_radius $base_border_radius;
+    }
+  }
 }
 
 // container for radio and check boxes


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