[libadwaita/wip/exalm/less-selectors: 2/2] stylesheet: Stop special casing GtkMenuButton styles




commit 41761028e69f6873782fbf541c3b1f593fd3c258
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Thu Nov 11 14:24:53 2021 +0500

    stylesheet: Stop special casing GtkMenuButton styles
    
    Since https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4150, menu
    buttons propagate all of their style classes to their internal
    GtkButton, so we can stop special casing basically all of that.
    
    Drastically reduces the size of the compiled stylesheet.

 src/stylesheet/widgets/_buttons.scss  | 48 +----------------------------------
 src/stylesheet/widgets/_toolbars.scss | 31 ----------------------
 2 files changed, 1 insertion(+), 78 deletions(-)
---
diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss
index d3ae7b13..c670c03f 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -384,58 +384,12 @@ menubutton {
   &.osd {
     background: none;
     color: inherit;
-
-    > button { @extend %osd_button; }
-  }
-
-  &.circular > button { @extend %circular_button; }
-  &.flat > button { @extend %button_basic_flat; }
-  &.outline > button { @extend %outline_button; }
-  &.pill > button { @extend %pill_button; }
-
-  &.suggested-action {
-    background-color: $accent_bg_color;
-    color: $accent_fg_color;
-  }
-
-  &.destructive-action {
-    background-color: $destructive_bg_color;
-    color: $destructive_fg_color;
-  }
-
-  &.opaque {
-    background-color: $opaque_button_default_bg;
-    color: $window_fg_color;
-  }
-
-  &.suggested-action,
-  &.destructive-action,
-  &.opaque {
-    border-radius: $button_radius;
-
-    &.circular, &.pill {
-      border-radius: 9999px;
-    }
-
-    > button {
-      @extend %opaque_button;
-
-      &, &:checked {
-        background-color: transparent;
-        color: inherit;
-      }
-    }
-  }
-
-  &.image-button > button {
-    min-width: 24px;
-    padding-left: 5px;
-    padding-right: 5px;
   }
 
   arrow {
     min-height: 16px;
     min-width: 16px;
+
     &.none {
       -gtk-icon-source: -gtk-icontheme('open-menu-symbolic');
     }
diff --git a/src/stylesheet/widgets/_toolbars.scss b/src/stylesheet/widgets/_toolbars.scss
index b86a5bdf..b881ce1c 100644
--- a/src/stylesheet/widgets/_toolbars.scss
+++ b/src/stylesheet/widgets/_toolbars.scss
@@ -7,31 +7,6 @@
     }
   }
 
-  menubutton:not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
-    &.image-button > button {
-      @extend %button_basic_flat;
-    }
-  }
-
-  menubutton.raised > button:not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
-    &.arrow-button,
-    &.image-button,
-    &.image-text-button {
-      @extend %button_basic_raised;
-    }
-  }
-
-  menubutton.suggested-action,
-  menubutton.destructive-action,
-  menubutton.opaque {
-    > button:not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
-      @extend %opaque_button;
-
-      color: inherit;
-      background-color: transparent;
-    }
-  }
-
   splitbutton {
     // Specificity bump
     > separator.vertical {
@@ -91,12 +66,6 @@ popover {
     }
   }
 
-  
menubutton:not(.flat):not(.outline):not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) 
{
-    &.image-button > button {
-      @extend %button_basic_raised;
-    }
-  }
-
   entry,
   spinbutton,
   splitbutton,


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