Bug 1212399 - Re-introduce better .toolbarbutton-1 styling for dark themes. r=gijs a=lhenry
authorDão Gottwald <dao@mozilla.com>
Fri, 16 Oct 2015 14:20:25 +0200
changeset 298162 a629611a519205cce4ad5e2558dc8fdf56170e75
parent 298161 5cd4864ee387a010fcd7e5703840a93110c87f7f
child 298163 26262d256546245014d88a65d7384ff1c2a4a4cd
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgijs, lhenry
bugs1212399
milestone43.0a2
Bug 1212399 - Re-introduce better .toolbarbutton-1 styling for dark themes. r=gijs a=lhenry
browser/themes/windows/browser.css
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -44,16 +44,28 @@
   --urlbar-dropmarker-hover-2x-region: rect(0, 44px, 28px, 22px);
   --urlbar-dropmarker-active-2x-region: rect(0, 66px, 28px, 44px);
 
   --panel-separator-color: ThreeDLightShadow;
 
   --urlbar-separator-color: hsla(0,0%,16%,.2);
 }
 
+#nav-bar[brighttext] {
+  --toolbarbutton-hover-background: rgba(255,255,255,.25);
+  --toolbarbutton-hover-bordercolor: rgba(255,255,255,.5);
+  --toolbarbutton-hover-boxshadow: none;
+
+  --toolbarbutton-active-background: rgba(255,255,255,.4);
+  --toolbarbutton-active-bordercolor: rgba(255,255,255,.7);
+  --toolbarbutton-active-boxshadow: 0 0 0 1px rgba(255,255,255,.4) inset;
+
+  --toolbarbutton-checkedhover-backgroundcolor: rgba(255,255,255,.3);
+}
+
 #menubar-items {
   -moz-box-orient: vertical; /* for flex hack */
 }
 
 #main-menubar {
   -moz-box-flex: 1; /* make menu items expand to fill toolbar height */
 }
 
@@ -1113,16 +1125,20 @@ toolbarbutton[constrain-size="true"][cui
   --urlbar-border-color: ThreeDShadow;
   --urlbar-border-color-hover: var(--urlbar-border-color);
 }
 
 #nav-bar:-moz-lwtheme {
   --urlbar-border-color: rgba(0,0,0,.32);
 }
 
+#nav-bar:-moz-lwtheme-brighttext {
+  --urlbar-border-color: var(--toolbarbutton-hover-bordercolor);
+}
+
 @media (-moz-windows-default-theme) {
   @media (-moz-os-version: windows-vista),
          (-moz-os-version: windows-win7),
          (-moz-os-version: windows-win8) {
     #nav-bar:not(:-moz-lwtheme) {
       --urlbar-border-color: hsla(210,54%,20%,.25) hsla(210,54%,20%,.27) hsla(210,54%,20%,.3);
       --urlbar-border-color-hover: hsla(210,54%,20%,.35) hsla(210,54%,20%,.37) hsla(210,54%,20%,.4);
     }
@@ -1141,16 +1157,21 @@ toolbarbutton[constrain-size="true"][cui
   -moz-appearance: none;
   margin: 0 3px;
   padding: 0;
   background-clip: padding-box;
   border: 1px solid;
   border-color: var(--urlbar-border-color);
 }
 
+#urlbar:-moz-lwtheme-brighttext,
+.searchbar-textbox:-moz-lwtheme-brighttext {
+  background-clip: border-box;
+}
+
 #urlbar:hover,
 .searchbar-textbox:hover {
   border-color: var(--urlbar-border-color-hover);
 }
 
 /* overlap the urlbar's border */
 #PopupAutoCompleteRichResult {
   margin-top: -1px;