[gnome-themes-standard] Transparent outsets istead of removing for nicer transitions. Replaced some @ifs with if() syntax.



commit aead06baab4a2c6dbc850ee33d959e3fbd7abb80
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Mon May 26 20:06:51 2014 +0200

    Transparent outsets istead of removing for nicer transitions.
    Replaced some @ifs with if() syntax.

 themes/Adwaita/gtk-3.0/_common.scss           |   14 ++--
 themes/Adwaita/gtk-3.0/_drawing.scss          |    9 ++-
 themes/Adwaita/gtk-3.0/gtk-contained-dark.css |   76 +++++------------------
 themes/Adwaita/gtk-3.0/gtk-contained.css      |   83 +++++-------------------
 4 files changed, 46 insertions(+), 136 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/_common.scss b/themes/Adwaita/gtk-3.0/_common.scss
index dd3c7d7..1b03363 100644
--- a/themes/Adwaita/gtk-3.0/_common.scss
+++ b/themes/Adwaita/gtk-3.0/_common.scss
@@ -163,10 +163,11 @@ GtkGrid:insensitive {
                                       $base_color 90%
                                       );
 
-  $_entry_shade: if($variant=='light', transparentize(black, 0.5), transparentize(black, 0.4));
+  $_entry_shade: if($variant=='light', transparentize(black, 0.5),
+                    transparentize(black, 0.4));
 
   box-shadow: inset 0 2px 2px -2px $_entry_shade,
-              0 1px $borders_edge; /* not working */
+              0 1px $borders_edge;
 
   background-color: transparent; // this needs to be 'transparent'
                                  // if we need a flat bg, let's abuse a gradient
@@ -180,7 +181,7 @@ GtkGrid:insensitive {
     border-color: $selected_bg_color;
     box-shadow: inset 0 2px 2px -2px $_entry_shade,
                 inset 0 0 2px 1px transparentize($selected_bg_color, 0.8), // focus indicator
-                0 1px $borders_edge; /* not working */
+                0 1px $borders_edge;
   }
   &:selected, &:backdrop:selected {
     color: $selected_fg_color;
@@ -190,7 +191,7 @@ GtkGrid:insensitive {
     color: $backdrop_fg_color;
     border-color: $backdrop_borders_color;
     background-image: linear-gradient(to bottom, $backdrop_base_color);
-    box-shadow: none; // let's make it flat
+    box-shadow: 0 1px transparentize($borders_edge,1);
   }
   &:backdrop:insensitive {
     color: $backdrop_insensitive_color;
@@ -375,7 +376,6 @@ GtkColorButton.button { // Uniform padding on the GtkColorButton.button
   }
   &.vertical {
     .button {
-      //FIXME box-shadow outset needs to be removed
       &:first-child {
         border-radius: 3px 3px 0 0;
         @include button(normal,$bg_color,$fg_color,true);
@@ -404,7 +404,7 @@ GtkColorButton.button { // Uniform padding on the GtkColorButton.button
  **************/
 GtkComboBox {
 
-  //FIXME padding and box-shadow outset issue
+  //FIXME padding issue
   padding: 0;
 
   -GtkComboBox-arrow-scaling: 0.5;
@@ -630,7 +630,7 @@ GtkPopover {
   &.frame { border-width: 1px; }
   &.header {
     background-color: darken($bg_color,5%);
-    box-shadow: inset 0 6px 3px -5px transparentize(black,0.4);
+    box-shadow: inset 0 6px 4px -5px transparentize(black,0.4);
 // I want just a top shadow
 // so negative spread
     border-width: 0px;
diff --git a/themes/Adwaita/gtk-3.0/_drawing.scss b/themes/Adwaita/gtk-3.0/_drawing.scss
index acb6b4c..81633dd 100644
--- a/themes/Adwaita/gtk-3.0/_drawing.scss
+++ b/themes/Adwaita/gtk-3.0/_drawing.scss
@@ -173,7 +173,8 @@ $widget_bottom_hilight: 0 1px $borders_edge; //outer hilight "used" on
     background-image: none;
     text-shadow: none;
     icon-shadow: none;
-    box-shadow: inset 0 1px transparentize(white,1);
+    @include _shadows(inset 0 1px transparentize(white,1),
+                      0 1px transparentize(white,1));
   }
 
   @else if $t==backdrop-active { // backdrop pushed button
@@ -181,7 +182,8 @@ $widget_bottom_hilight: 0 1px $borders_edge; //outer hilight "used" on
     border-color: $backdrop_borders_color;
     background-image: linear-gradient(to bottom,
                         transparentize($backdrop_borders_color,.7));
-    box-shadow: inset 0 1px transparentize(white,1);
+    @include _shadows(inset 0 1px transparentize(white,1),
+                      0 1px transparentize(white,1));
   }
 
   @else if $t==backdrop-insensitive { // backdrop insensitive button
@@ -196,6 +198,7 @@ $widget_bottom_hilight: 0 1px $borders_edge; //outer hilight "used" on
     border-color: $backdrop_borders_color;
     background-image: linear-gradient(to bottom,
                         transparentize($backdrop_borders_color,.9));
-    box-shadow: inset 0 1px transparentize(white,1);
+    @include _shadows(inset 0 1px transparentize(white,1),
+                      0 1px transparentize(white,1));
   }
 }
diff --git a/themes/Adwaita/gtk-3.0/gtk-contained-dark.css b/themes/Adwaita/gtk-3.0/gtk-contained-dark.css
index 0dff953..0eddf08 100644
--- a/themes/Adwaita/gtk-3.0/gtk-contained-dark.css
+++ b/themes/Adwaita/gtk-3.0/gtk-contained-dark.css
@@ -21,11 +21,9 @@
   -GtkWidget-focus-line-width: 1;
   -GtkWindow-resize-grip-width: 0;
   -GtkWindow-resize-grip-height: 0;
-  outline-color: rgba(238, 238, 236, 0.3);
+  outline-color: rgba(238, 238, 236, 0.7);
   outline-style: dashed;
-  outline-offset: -3px;
-  outline-width: 1px;
-  outline-radius: 2px; }
+  outline-offset: 2px; }
 
 /***************
  * Base States *
@@ -117,7 +115,7 @@ GtkGrid:insensitive {
   transition: all 200ms ease-out;
   border: 1px solid #1c1f1f;
   background-image: linear-gradient(to bottom, #2b2b2b 0%, #333333 90%);
-  box-shadow: inset 0 2px 2px -2px rgba(0, 0, 0, 0.6), 0 1px rgba(238, 238, 236, 0.1);
+  box-shadow: inset 0 2px 2px -2px rgba(0, 0, 0, 0.5), 0 1px rgba(238, 238, 236, 0.1);
   /* not working */
   background-color: transparent; }
   .entry:insensitive {
@@ -126,7 +124,7 @@ GtkGrid:insensitive {
     box-shadow: 0 1px rgba(238, 238, 236, 0.1); }
   .entry:focus {
     border-color: #2a76c6;
-    box-shadow: inset 0 2px 2px -2px rgba(0, 0, 0, 0.6), inset 0 0 2px 1px rgba(42, 118, 198, 0.2), 0 1px 
rgba(238, 238, 236, 0.1);
+    box-shadow: inset 0 2px 2px -2px rgba(0, 0, 0, 0.4), inset 0 0 2px 1px rgba(42, 118, 198, 0.5), 0 1px 
rgba(238, 238, 236, 0.1);
     /* not working */ }
   .entry:selected, .entry:backdrop:selected {
     color: white;
@@ -135,7 +133,7 @@ GtkGrid:insensitive {
     color: #eeeeec;
     border-color: #1c1f1f;
     background-image: linear-gradient(to bottom, #262626);
-    box-shadow: none; }
+    box-shadow: 0 1px rgba(238, 238, 236, 0); }
   .entry:backdrop:insensitive {
     color: white;
     background-image: linear-gradient(to bottom, #393f3f); }
@@ -197,14 +195,14 @@ GtkGrid:insensitive {
     background-image: none;
     text-shadow: none;
     icon-shadow: none;
-    box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
+    box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
     .button:backdrop:active {
       border-width: 1px;
       border-style: solid;
       color: #eeeeec;
       border-color: #1c1f1f;
       background-image: linear-gradient(to bottom, rgba(28, 31, 31, 0.3));
-      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
     .button:backdrop:insensitive {
       border-width: 1px;
       border-style: solid;
@@ -217,7 +215,7 @@ GtkGrid:insensitive {
       color: white;
       border-color: #1c1f1f;
       background-image: linear-gradient(to bottom, rgba(28, 31, 31, 0.1));
-      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
   .button:insensitive {
     border-width: 1px;
     border-style: solid;
@@ -269,7 +267,7 @@ GtkGrid:insensitive {
       background-image: none;
       text-shadow: none;
       icon-shadow: none;
-      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
       .button.suggested-action:backdrop:insensitive {
         border-width: 1px;
         border-style: solid;
@@ -320,7 +318,7 @@ GtkGrid:insensitive {
       background-image: none;
       text-shadow: none;
       icon-shadow: none;
-      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
       .button.destructive-action:backdrop:insensitive {
         border-width: 1px;
         border-style: solid;
@@ -440,7 +438,7 @@ GtkColorButton.button {
       background-image: none;
       text-shadow: none;
       icon-shadow: none;
-      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
     .spinbutton.vertical .button:first-child:backdrop:insensitive {
       border-width: 1px;
       border-style: solid;
@@ -492,7 +490,7 @@ GtkColorButton.button {
       background-image: none;
       text-shadow: none;
       icon-shadow: none;
-      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
     .spinbutton.vertical .button:last-child:backdrop:insensitive {
       border-width: 1px;
       border-style: solid;
@@ -575,48 +573,6 @@ GtkComboBox {
   .tiled .header-bar, .maximized .header-bar {
     border-radius: 0; }
 
-/**************
- * Tree Views *
- **************/
-column-header .button,
-column-header .button:hover,
-column-header .button:active,
-column-header .button:backdrop {
-  border-width: 0 1px 1px 0;
-  border-color: transparent;
-  box-shadow: none;
-  border-radius: 0;
-  border-image: linear-gradient(to top, #272929, #333333) 0 1 1 0;
-  background-image: none;
-  background-color: #333333;
-  color: rgba(238, 238, 236, 0.5);
-  font-weight: bold; }
-
-/*********
- * Menus *
- *********/
-.menubar {
-  padding: 2px; }
-  .menubar .menuitem {
-    background-color: #393f3f;
-    padding: 4px 8px;
-    border-radius: 3px 3px 0 0; }
-    .menubar .menuitem:hover, .menubar .menuitem:active {
-      background-color: #333333; }
-
-.menu .menuitem {
-  background-color: #333333;
-  padding: 4px;
-  border-radius: 0; }
-  .menu .menuitem:hover {
-    color: white;
-    background-color: #2a76c6; }
-  .menu .menuitem:active {
-    color: white;
-    background-color: #256ab1; }
-.menu .separator {
-  color: transparent; }
-
 /***************
  * Popovers   *
  ***************/
@@ -667,7 +623,7 @@ GtkPopover {
     border-width: 1px; }
   .notebook.header {
     background-color: #2d3232;
-    box-shadow: inset 0 6px 3px -5px rgba(0, 0, 0, 0.6);
+    box-shadow: inset 0 6px 4px -5px rgba(0, 0, 0, 0.6);
     border-width: 0px; }
     .notebook.header.frame {
       border: 1px solid #1c1f1f; }
@@ -754,10 +710,8 @@ GtkPopover {
   .frame:backdrop {
     border-color: rgba(28, 31, 31, 0.6); }
 
-GtkScrolledWindow .frame {
+GtkScrolledWindow.frame {
   border-radius: 2px; }
-GtkScrolledWindow GtkViewport.frame {
-  border-style: none; }
 
 /**********************
  * Window Decorations *
@@ -805,5 +759,5 @@ GtkScrolledWindow GtkViewport.frame {
     background-image: none;
     text-shadow: none;
     icon-shadow: none;
-    box-shadow: inset 0 1px rgba(255, 255, 255, 0);
+    box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0);
     border-color: transparent; }
diff --git a/themes/Adwaita/gtk-3.0/gtk-contained.css b/themes/Adwaita/gtk-3.0/gtk-contained.css
index bf7b37f..d4b1cda 100644
--- a/themes/Adwaita/gtk-3.0/gtk-contained.css
+++ b/themes/Adwaita/gtk-3.0/gtk-contained.css
@@ -21,11 +21,9 @@
   -GtkWidget-focus-line-width: 1;
   -GtkWindow-resize-grip-width: 0;
   -GtkWindow-resize-grip-height: 0;
-  outline-color: rgba(46, 52, 54, 0.3);
+  outline-color: rgba(46, 52, 54, 0.7);
   outline-style: dashed;
-  outline-offset: -3px;
-  outline-width: 1px;
-  outline-radius: 2px; }
+  outline-offset: 2px; }
 
 /***************
  * Base States *
@@ -118,7 +116,6 @@ GtkGrid:insensitive {
   border: 1px solid #a1a1a1;
   background-image: linear-gradient(to bottom, #f7f7f7 0%, white 90%);
   box-shadow: inset 0 2px 2px -2px rgba(0, 0, 0, 0.5), 0 1px white;
-  /* not working */
   background-color: transparent; }
   .entry:insensitive {
     color: #748489;
@@ -126,7 +123,7 @@ GtkGrid:insensitive {
     box-shadow: 0 1px white; }
   .entry:focus {
     border-color: #4a90d9;
-    box-shadow: inset 0 2px 2px -2px rgba(0, 0, 0, 0.5), inset 0 0 2px 1px rgba(74, 144, 217, 0.2), 0 1px 
white;
+    box-shadow: inset 0 2px 2px -2px rgba(0, 0, 0, 0.4), inset 0 0 2px 1px rgba(74, 144, 217, 0.5), 0 1px 
white;
     /* not working */ }
   .entry:selected, .entry:backdrop:selected {
     color: white;
@@ -135,7 +132,7 @@ GtkGrid:insensitive {
     color: #454f52;
     border-color: #a1a1a1;
     background-image: linear-gradient(to bottom, #fcfcfc);
-    box-shadow: none; }
+    box-shadow: 0 1px rgba(255, 255, 255, 0); }
   .entry:backdrop:insensitive {
     color: #c7c7c7;
     background-image: linear-gradient(to bottom, #ededed); }
@@ -197,14 +194,14 @@ GtkGrid:insensitive {
     background-image: none;
     text-shadow: none;
     icon-shadow: none;
-    box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
+    box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
     .button:backdrop:active {
       border-width: 1px;
       border-style: solid;
       color: #454f52;
       border-color: #a1a1a1;
       background-image: linear-gradient(to bottom, rgba(161, 161, 161, 0.3));
-      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
     .button:backdrop:insensitive {
       border-width: 1px;
       border-style: solid;
@@ -217,7 +214,7 @@ GtkGrid:insensitive {
       color: #c7c7c7;
       border-color: #a1a1a1;
       background-image: linear-gradient(to bottom, rgba(161, 161, 161, 0.1));
-      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
   .button:insensitive {
     border-width: 1px;
     border-style: solid;
@@ -242,7 +239,7 @@ GtkGrid:insensitive {
     border-color: #184472;
     text-shadow: 0 -1px rgba(0, 0, 0, 0.54353);
     icon-shadow: 0 -1px rgba(0, 0, 0, 0.54353);
-    box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px white; }
+    box-shadow: inset 0 1px white, 0 1px white; }
     .button.suggested-action:hover {
       border-width: 1px;
       border-style: solid;
@@ -251,7 +248,7 @@ GtkGrid:insensitive {
       background-image: linear-gradient(to bottom, #85b4e5, #5b9add 40%, #4a90d9);
       text-shadow: 0 -1px rgba(0, 0, 0, 0.51153);
       icon-shadow: 0 -1px rgba(0, 0, 0, 0.51153);
-      box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px white; }
+      box-shadow: inset 0 1px white, 0 1px white; }
     .button.suggested-action:active {
       border-width: 1px;
       border-style: solid;
@@ -269,7 +266,7 @@ GtkGrid:insensitive {
       background-image: none;
       text-shadow: none;
       icon-shadow: none;
-      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
       .button.suggested-action:backdrop:insensitive {
         border-width: 1px;
         border-style: solid;
@@ -293,7 +290,7 @@ GtkGrid:insensitive {
     border-color: #760909;
     text-shadow: 0 -1px rgba(0, 0, 0, 0.56078);
     icon-shadow: 0 -1px rgba(0, 0, 0, 0.56078);
-    box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px white; }
+    box-shadow: inset 0 1px white, 0 1px white; }
     .button.destructive-action:hover {
       border-width: 1px;
       border-style: solid;
@@ -302,7 +299,7 @@ GtkGrid:insensitive {
       background-image: linear-gradient(to bottom, #f46b6b, #f03c3c 40%, #ef2929);
       text-shadow: 0 -1px rgba(0, 0, 0, 0.52878);
       icon-shadow: 0 -1px rgba(0, 0, 0, 0.52878);
-      box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px white; }
+      box-shadow: inset 0 1px white, 0 1px white; }
     .button.destructive-action:active {
       border-width: 1px;
       border-style: solid;
@@ -320,7 +317,7 @@ GtkGrid:insensitive {
       background-image: none;
       text-shadow: none;
       icon-shadow: none;
-      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
       .button.destructive-action:backdrop:insensitive {
         border-width: 1px;
         border-style: solid;
@@ -440,7 +437,7 @@ GtkColorButton.button {
       background-image: none;
       text-shadow: none;
       icon-shadow: none;
-      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
     .spinbutton.vertical .button:first-child:backdrop:insensitive {
       border-width: 1px;
       border-style: solid;
@@ -492,7 +489,7 @@ GtkColorButton.button {
       background-image: none;
       text-shadow: none;
       icon-shadow: none;
-      box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
     .spinbutton.vertical .button:last-child:backdrop:insensitive {
       border-width: 1px;
       border-style: solid;
@@ -575,48 +572,6 @@ GtkComboBox {
   .tiled .header-bar, .maximized .header-bar {
     border-radius: 0; }
 
-/**************
- * Tree Views *
- **************/
-column-header .button,
-column-header .button:hover,
-column-header .button:active,
-column-header .button:backdrop {
-  border-width: 0 1px 1px 0;
-  border-color: transparent;
-  box-shadow: none;
-  border-radius: 0;
-  border-image: linear-gradient(to top, #d0d0d0, white) 0 1 1 0;
-  background-image: none;
-  background-color: white;
-  color: rgba(46, 52, 54, 0.5);
-  font-weight: bold; }
-
-/*********
- * Menus *
- *********/
-.menubar {
-  padding: 2px; }
-  .menubar .menuitem {
-    background-color: #ededed;
-    padding: 4px 8px;
-    border-radius: 3px 3px 0 0; }
-    .menubar .menuitem:hover, .menubar .menuitem:active {
-      background-color: white; }
-
-.menu .menuitem {
-  background-color: white;
-  padding: 4px;
-  border-radius: 0; }
-  .menu .menuitem:hover {
-    color: white;
-    background-color: #4a90d9; }
-  .menu .menuitem:active {
-    color: white;
-    background-color: #2a76c6; }
-.menu .separator {
-  color: transparent; }
-
 /***************
  * Popovers   *
  ***************/
@@ -667,7 +622,7 @@ GtkPopover {
     border-width: 1px; }
   .notebook.header {
     background-color: #e0e0e0;
-    box-shadow: inset 0 6px 3px -5px rgba(0, 0, 0, 0.6);
+    box-shadow: inset 0 6px 4px -5px rgba(0, 0, 0, 0.6);
     border-width: 0px; }
     .notebook.header.frame {
       border: 1px solid #a1a1a1; }
@@ -754,10 +709,8 @@ GtkPopover {
   .frame:backdrop {
     border-color: rgba(161, 161, 161, 0.6); }
 
-GtkScrolledWindow .frame {
+GtkScrolledWindow.frame {
   border-radius: 2px; }
-GtkScrolledWindow GtkViewport.frame {
-  border-style: none; }
 
 /**********************
  * Window Decorations *
@@ -805,5 +758,5 @@ GtkScrolledWindow GtkViewport.frame {
     background-image: none;
     text-shadow: none;
     icon-shadow: none;
-    box-shadow: inset 0 1px rgba(255, 255, 255, 0);
+    box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0);
     border-color: transparent; }


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