[gnome-calculator/wip/cdavis/gtk4: 9/9] css: Fix margins for basic buttons




commit 29781f3e70f9fccefabbd005cf7afe5fc45930b8
Author: Christopher Davis <christopherdavis gnome org>
Date:   Wed Oct 20 15:01:05 2021 -0700

    css: Fix margins for basic buttons
    
    The use of Gizmos means that :not(:only-child) does not work
    for us.
    
    Fixes an issue of misaligned margins for basic buttons.

 src/ui/buttons-basic.ui | 1 +
 src/ui/calculator.css   | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/ui/buttons-basic.ui b/src/ui/buttons-basic.ui
index e9fae7fc..266c0509 100644
--- a/src/ui/buttons-basic.ui
+++ b/src/ui/buttons-basic.ui
@@ -8,6 +8,7 @@
     <property name="visible-child">basic</property>
     <style>
       <class name="math-buttons"/>
+      <class name="basic-buttons"/>
     </style>
     <child>
       <object class="GtkGrid" id="basic">
diff --git a/src/ui/calculator.css b/src/ui/calculator.css
index 6caf282d..f2101741 100644
--- a/src/ui/calculator.css
+++ b/src/ui/calculator.css
@@ -61,11 +61,11 @@ clamp > grid.small > :first-child {
   transition: 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
 }
 
-.math-buttons.unfolded > grid:not(:only-child):first-child {
+.math-buttons.unfolded:not(.basic-buttons) > grid:first-child {
   margin-right: 6px;
 }
 
-.math-buttons.unfolded > grid:not(:only-child):last-child {
+.math-buttons.unfolded:not(.basic-buttons) > grid:last-child {
   margin-left: 6px;
 }
 


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