Bug 1368672 - Don't set a color on toolbar buttons by default (color should be inherited) and explicitly inherit color in hover/open states for custom-styled toolbar buttons. r?johannh draft
authorDão Gottwald <dao@mozilla.com>
Tue, 06 Jun 2017 12:57:58 +0200
changeset 589546 95f12f5b3b2c86c4d6c0c9e07f6e89bd9031569a
parent 589544 4dd1d17ba22660b8f5869a707f2e4e9f9dd5be5b
child 631923 ace76c8e97eac35812b4c23709b800c2c9023ac7
push id62418
push userdgottwald@mozilla.com
push dateTue, 06 Jun 2017 10:58:24 +0000
reviewersjohannh
bugs1368672
milestone55.0a1
Bug 1368672 - Don't set a color on toolbar buttons by default (color should be inherited) and explicitly inherit color in hover/open states for custom-styled toolbar buttons. r?johannh MozReview-Commit-ID: J2QF8FBi0Ll
browser/themes/shared/toolbarbuttons.inc.css
toolkit/themes/linux/global/toolbarbutton.css
toolkit/themes/osx/global/toolbarbutton.css
toolkit/themes/windows/global/toolbarbutton.css
--- a/browser/themes/shared/toolbarbuttons.inc.css
+++ b/browser/themes/shared/toolbarbuttons.inc.css
@@ -289,32 +289,34 @@ toolbarbutton.bookmark-item:not(.subview
 @conditionalForwardWithUrlbar@ > #forward-button:not([open]):not(:active):not([disabled]):hover > .toolbarbutton-icon,
 %endif
 #nav-bar .toolbarbutton-1:not([buttonover]):not([open]):not(:active):hover > .toolbarbutton-menubutton-dropmarker:not([disabled]) > .dropmarker-icon {
   background: var(--toolbarbutton-hover-background);
 %ifndef MOZ_PHOTON_THEME
   border-color: var(--toolbarbutton-hover-bordercolor);
   box-shadow: var(--toolbarbutton-hover-boxshadow);
 %endif
+  color: inherit;
 }
 
 .findbar-button:not([disabled=true]):-moz-any([checked="true"],:hover:active) > .toolbarbutton-text,
 toolbarbutton.bookmark-item:not(.subviewbutton):hover:active:not([disabled="true"]),
 toolbarbutton.bookmark-item[open="true"],
 #nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled=true]):-moz-any(:hover:active, [open]) > .toolbarbutton-icon,
 #nav-bar .toolbarbutton-1[open] > .toolbarbutton-menubutton-dropmarker:not([disabled=true]) > .dropmarker-icon,
 #nav-bar .toolbarbutton-1:not([disabled=true]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-icon,
 #nav-bar .toolbarbutton-1:not([disabled=true]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-text,
 #nav-bar .toolbarbutton-1:not([disabled=true]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-badge-stack {
   background: var(--toolbarbutton-active-background);
 %ifndef MOZ_PHOTON_THEME
   border-color: var(--toolbarbutton-active-bordercolor);
   box-shadow: var(--toolbarbutton-active-boxshadow);
 %endif
   transition-duration: 10ms;
+  color: inherit;
 }
 
 #nav-bar .toolbarbutton-1[checked]:not(:active):hover > .toolbarbutton-icon {
   background-color: var(--toolbarbutton-checkedhover-backgroundcolor);
   transition: background-color .4s;
 }
 
 %ifndef MOZ_PHOTON_THEME
--- a/toolkit/themes/linux/global/toolbarbutton.css
+++ b/toolkit/themes/linux/global/toolbarbutton.css
@@ -11,17 +11,16 @@
 /* ::::: toolbarbutton ::::: */
 
 toolbarbutton {
   -moz-appearance: toolbarbutton;
   -moz-box-align: center;
   -moz-box-pack: center;
   margin: 0;
   padding: 3px;
-  color: -moz-DialogText;
 }
 
 toolbarbutton:-moz-lwtheme {
   text-shadow: none;
 }
 
 .toolbarbutton-icon[label]:not([label=""]),
 .toolbarbutton-icon[type="menu"] {
@@ -58,17 +57,16 @@ toolbarbutton[disabled="true"][open="tru
   color: GrayText;
 }
 
 toolbarbutton[checked="true"]:not(:hover) {
   color: ButtonText;
 }
 
 toolbarbutton:-moz-lwtheme:not(:hover):not([checked="true"]):not([open="true"]):not([disabled="true"]) {
-  color: inherit;
   text-shadow: inherit;
 }
 
 /* ::::: toolbarbutton menu ::::: */
 
 .toolbarbutton-menu-dropmarker {
   -moz-appearance: toolbarbutton-dropdown !important;
   list-style-image: none;
--- a/toolkit/themes/osx/global/toolbarbutton.css
+++ b/toolkit/themes/osx/global/toolbarbutton.css
@@ -24,17 +24,17 @@ toolbarbutton:not([disabled="true"]):act
   text-align: center;
   vertical-align: middle;
 }
 
 toolbarbutton[disabled="true"],
 toolbarbutton[disabled="true"]:hover,
 toolbarbutton[disabled="true"]:hover:active,
 toolbarbutton[disabled="true"][open="true"] {
-  color: -moz-mac-disabledtoolbartext !important;
+  color: -moz-mac-disabledtoolbartext;
 }
 
 /* ::::: toolbarbutton menu ::::: */
 
 .toolbarbutton-menu-dropmarker {
   -moz-appearance: none !important;
   border: none !important;
   background-color: transparent !important;
--- a/toolkit/themes/windows/global/toolbarbutton.css
+++ b/toolkit/themes/windows/global/toolbarbutton.css
@@ -11,17 +11,16 @@
 /* ::::: toolbarbutton ::::: */
 
 toolbarbutton {
   -moz-appearance: toolbarbutton;
   -moz-box-align: center;
   -moz-box-pack: center;
   margin: 0;
   padding: 3px;
-  color: -moz-DialogText;
 }
 
 .toolbarbutton-icon[label]:not([label=""]),
 .toolbarbutton-icon[type="menu"] {
   margin-inline-end: 5px;
 }
 
 .toolbarbutton-text {
@@ -71,28 +70,26 @@ toolbarbutton[checked="true"]:not([disab
 }
 
 @media (-moz-windows-default-theme) {
   toolbarbutton:-moz-lwtheme {
     text-shadow: none;
   }
 
   toolbarbutton:-moz-lwtheme:not([disabled="true"]) {
-    color: inherit;
     text-shadow: inherit;
   }
 }
 
 @media (-moz-windows-default-theme: 0) {
   toolbarbutton:-moz-lwtheme {
     -moz-appearance: none;
   }
 
   toolbarbutton:-moz-lwtheme:not([disabled="true"]) {
-    color: inherit;
     text-shadow: inherit;
   }
 }
 
 /* ::::: toolbarbutton menu ::::: */
 
 .toolbarbutton-menu-dropmarker {
   -moz-appearance: none !important;