[gnome-themes-standard/wip/sass] embrace the SASS nesting where possible



commit 9d214d64f2eca67b0e4c6e7fb66b02f29f4c1d4d
Author: Jakub Steiner <jimmac gmail com>
Date:   Tue May 27 17:11:46 2014 +0200

    embrace the SASS nesting where possible

 themes/Adwaita/gtk-3.0/_common.scss           |   58 +++++++++++++------------
 themes/Adwaita/gtk-3.0/gtk-contained-dark.css |   38 ++++++++--------
 themes/Adwaita/gtk-3.0/gtk-contained.css      |   38 ++++++++--------
 3 files changed, 68 insertions(+), 66 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/_common.scss b/themes/Adwaita/gtk-3.0/_common.scss
index dafff72..fb1ea02 100644
--- a/themes/Adwaita/gtk-3.0/_common.scss
+++ b/themes/Adwaita/gtk-3.0/_common.scss
@@ -277,10 +277,36 @@ GtkGrid:insensitive {
       }
     }
   }
-}
 
-GtkColorButton.button { // Uniform padding on the GtkColorButton.button
-  padding: 4px;
+  // linked buttons
+  .linked &, .linked &:backdrop {
+    border-radius: 0;
+    border-right-width: 0;
+    &:first-child {
+      border-radius: 3px 0 0 3px;
+    }
+    &:last-child {
+      border-radius: 0 3px 3px 0;
+      border-right-width: 1px;
+    }
+    &:only-child {
+      border-radius: 3px;
+      border-right-width: 1px;
+    }
+  }
+  
+  // headerbar buttons
+  .header-bar & {
+    &.text-button {
+      padding: 6px 8px 5px; // due to font metrics the image buttons
+                            // are 1px shorter
+    }
+    &.image-button {
+      padding: 8px;
+    }
+  }
+  
+  .primary-toolbar & { icon-shadow: none; } // tango icons don't need added shadows
 }
 
 /* menu/popover buttons */
@@ -314,32 +340,8 @@ GtkColorButton.button { // Uniform padding on the GtkColorButton.button
   }
 }
 
-.linked .button, .linked .button:backdrop {
-  border-radius: 0;
-  border-right-width: 0;
-  &:first-child {
-    border-radius: 3px 0 0 3px;
-  }
-  &:last-child {
-    border-radius: 0 3px 3px 0;
-    border-right-width: 1px;
-  }
-  &:only-child {
-    border-radius: 3px;
-    border-right-width: 1px;
-  }
-}
-
-.header-bar .button {
-  &.text-button {
-    padding: 6px 8px 5px; // due to font metrics the image buttons
-                          // are 1px shorter
-  }
-  &.image-button {
-    padding: 8px;
-  }
-}
 
+GtkColorButton.button { padding: 4px; } // Uniform padding on the GtkColorButton.button
 
 /*****************
  * GtkSpinButton *
diff --git a/themes/Adwaita/gtk-3.0/gtk-contained-dark.css b/themes/Adwaita/gtk-3.0/gtk-contained-dark.css
index c8e8c49..7fbe5ec 100644
--- a/themes/Adwaita/gtk-3.0/gtk-contained-dark.css
+++ b/themes/Adwaita/gtk-3.0/gtk-contained-dark.css
@@ -334,9 +334,23 @@ GtkGrid:insensitive {
       text-shadow: none;
       icon-shadow: none;
       box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
-
-GtkColorButton.button {
-  padding: 4px; }
+  .linked .button, .linked .button:backdrop {
+    border-radius: 0;
+    border-right-width: 0; }
+    .linked .button:first-child, .linked .button:backdrop:first-child {
+      border-radius: 3px 0 0 3px; }
+    .linked .button:last-child, .linked .button:backdrop:last-child {
+      border-radius: 0 3px 3px 0;
+      border-right-width: 1px; }
+    .linked .button:only-child, .linked .button:backdrop:only-child {
+      border-radius: 3px;
+      border-right-width: 1px; }
+  .header-bar .button.text-button {
+    padding: 6px 8px 5px; }
+  .header-bar .button.image-button {
+    padding: 8px; }
+  .primary-toolbar .button {
+    icon-shadow: none; }
 
 /* menu/popover buttons */
 .menuitem.button, .menuitem.button:active, .menuitem.button:insensitive, .menuitem.button:active:insensitive 
{
@@ -356,22 +370,8 @@ GtkColorButton.button {
     border: none;
     box-shadow: none; }
 
-.linked .button, .linked .button:backdrop {
-  border-radius: 0;
-  border-right-width: 0; }
-  .linked .button:first-child, .linked .button:backdrop:first-child {
-    border-radius: 3px 0 0 3px; }
-  .linked .button:last-child, .linked .button:backdrop:last-child {
-    border-radius: 0 3px 3px 0;
-    border-right-width: 1px; }
-  .linked .button:only-child, .linked .button:backdrop:only-child {
-    border-radius: 3px;
-    border-right-width: 1px; }
-
-.header-bar .button.text-button {
-  padding: 6px 8px 5px; }
-.header-bar .button.image-button {
-  padding: 8px; }
+GtkColorButton.button {
+  padding: 4px; }
 
 /*****************
  * GtkSpinButton *
diff --git a/themes/Adwaita/gtk-3.0/gtk-contained.css b/themes/Adwaita/gtk-3.0/gtk-contained.css
index d60e437..7f806c5 100644
--- a/themes/Adwaita/gtk-3.0/gtk-contained.css
+++ b/themes/Adwaita/gtk-3.0/gtk-contained.css
@@ -334,9 +334,23 @@ GtkGrid:insensitive {
       text-shadow: none;
       icon-shadow: none;
       box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
-
-GtkColorButton.button {
-  padding: 4px; }
+  .linked .button, .linked .button:backdrop {
+    border-radius: 0;
+    border-right-width: 0; }
+    .linked .button:first-child, .linked .button:backdrop:first-child {
+      border-radius: 3px 0 0 3px; }
+    .linked .button:last-child, .linked .button:backdrop:last-child {
+      border-radius: 0 3px 3px 0;
+      border-right-width: 1px; }
+    .linked .button:only-child, .linked .button:backdrop:only-child {
+      border-radius: 3px;
+      border-right-width: 1px; }
+  .header-bar .button.text-button {
+    padding: 6px 8px 5px; }
+  .header-bar .button.image-button {
+    padding: 8px; }
+  .primary-toolbar .button {
+    icon-shadow: none; }
 
 /* menu/popover buttons */
 .menuitem.button, .menuitem.button:active, .menuitem.button:insensitive, .menuitem.button:active:insensitive 
{
@@ -356,22 +370,8 @@ GtkColorButton.button {
     border: none;
     box-shadow: none; }
 
-.linked .button, .linked .button:backdrop {
-  border-radius: 0;
-  border-right-width: 0; }
-  .linked .button:first-child, .linked .button:backdrop:first-child {
-    border-radius: 3px 0 0 3px; }
-  .linked .button:last-child, .linked .button:backdrop:last-child {
-    border-radius: 0 3px 3px 0;
-    border-right-width: 1px; }
-  .linked .button:only-child, .linked .button:backdrop:only-child {
-    border-radius: 3px;
-    border-right-width: 1px; }
-
-.header-bar .button.text-button {
-  padding: 6px 8px 5px; }
-.header-bar .button.image-button {
-  padding: 8px; }
+GtkColorButton.button {
+  padding: 4px; }
 
 /*****************
  * GtkSpinButton *


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