Bug 1441102 - Replace --titlebar-text-color with a class. r?florian
MozReview-Commit-ID: 9ruAARse3LU
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -581,17 +581,17 @@
</popupset>
<box id="appMenu-viewCache" hidden="true"/>
#ifdef CAN_DRAW_IN_TITLEBAR
<vbox id="titlebar">
<hbox id="titlebar-content">
<spacer id="titlebar-spacer" flex="1"/>
<hbox id="titlebar-buttonbox-container">
- <hbox id="titlebar-buttonbox">
+ <hbox id="titlebar-buttonbox" class="titlebar-color">
<toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/>
<toolbarbutton class="titlebar-button" id="titlebar-max" oncommand="onTitlebarMaxClick();"/>
<toolbarbutton class="titlebar-button" id="titlebar-close" command="cmd_closeWindow"/>
</hbox>
</hbox>
#ifdef XP_MACOSX
<!-- OS X does not natively support RTL for its titlebar items, so we prevent this secondary
buttonbox from reversing order in RTL by forcing an LTR direction. -->
@@ -602,17 +602,19 @@
</hbox>
#endif
</hbox>
</vbox>
#endif
<toolbox id="navigator-toolbox">
<!-- Menu -->
- <toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
+ <toolbar type="menubar" id="toolbar-menubar"
+ class="chromeclass-menubar titlebar-color"
+ customizable="true"
mode="icons"
#ifdef MENUBAR_CAN_AUTOHIDE
toolbarname="&menubarCmd.label;"
accesskey="&menubarCmd.accesskey;"
autohide="true"
#endif
context="toolbar-context-menu">
<toolbaritem id="menubar-items" align="center">
@@ -625,16 +627,17 @@
#ifndef XP_MACOSX
<hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"
skipintoolbarset="true"/>
#endif
#endif
</toolbar>
<toolbar id="TabsToolbar"
+ class="titlebar-color"
fullscreentoolbar="true"
customizable="true"
mode="icons"
aria-label="&tabsToolbar.label;"
context="toolbar-context-menu"
collapsed="true">
#ifdef CAN_DRAW_IN_TITLEBAR
--- a/browser/themes/windows/browser-aero.css
+++ b/browser/themes/windows/browser-aero.css
@@ -35,24 +35,28 @@
:root:not(:-moz-lwtheme) {
background-color: hsl(0, 0%, 78%);
}
@media (-moz-windows-accent-color-in-titlebar: 0) {
:root[tabsintitlebar]:not(:-moz-lwtheme) {
background-color: hsl(235,33%,19%);
- --titlebar-text-color: hsl(240,9%,98%);
+ }
+ :root[tabsintitlebar] .titlebar-color:not(:-moz-lwtheme) {
+ color: hsl(240,9%,98%);
}
}
@media (-moz-windows-accent-color-in-titlebar) {
:root[tabsintitlebar]:not(:-moz-window-inactive):not(:-moz-lwtheme) {
background-color: -moz-win-accentcolor;
- --titlebar-text-color: -moz-win-accentcolortext;
+ }
+ :root[tabsintitlebar] .titlebar-color:not(:-moz-window-inactive):not(:-moz-lwtheme) {
+ color: -moz-win-accentcolortext;
}
}
:root[tabsintitlebar] .tab-label:-moz-window-inactive {
/* Calculated to match the opacity change of Windows Explorer
titlebar text change for inactive windows. */
opacity: .6;
}
@@ -77,17 +81,17 @@
-moz-appearance: none !important;
}
.titlebar-button {
border: none;
margin: 0 !important;
padding: 8px 17px;
-moz-context-properties: stroke;
- stroke: var(--titlebar-text-color);
+ stroke: currentColor;
}
.titlebar-button > .toolbarbutton-icon {
width: 12px;
height: 12px;
}
#titlebar-min {
@@ -274,18 +278,18 @@
*/
@media not all and (-moz-os-version: windows-win7) {
#toolbar-menubar:not(:-moz-lwtheme):-moz-window-inactive {
color: ThreeDShadow;
}
}
}
- :root[darkwindowframe="true"]:not(:-moz-lwtheme):not(:-moz-window-inactive) {
- --titlebar-text-color: white;
+ :root[darkwindowframe="true"] .titlebar-color:not(:-moz-window-inactive):not(:-moz-lwtheme) {
+ color: white;
}
/* Show borders on Win 7 & 8, but not on 10 and later: */
@media (-moz-os-version: windows-win7),
(-moz-os-version: windows-win8) {
/* Vertical toolbar border */
#main-window[sizemode=normal] #navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(:-moz-lwtheme),
#main-window[sizemode=normal] #navigator-toolbox > toolbar:-moz-lwtheme {
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -7,18 +7,16 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");
%include ../shared/browser.inc.css
%filter substitution
%define glassShadowColor hsla(240,5%,5%,0.3)
:root {
- --titlebar-text-color: currentColor;
-
--toolbar-non-lwt-bgcolor: -moz-dialog;
--toolbar-non-lwt-textcolor: -moz-dialogtext;
--toolbar-non-lwt-bgimage: linear-gradient(rgba(255,255,255,.15), rgba(255,255,255,.15));
--toolbar-bgcolor: var(--toolbar-non-lwt-bgcolor);
--toolbar-bgimage: var(--toolbar-non-lwt-bgimage);
--toolbarbutton-vertical-text-padding: calc(var(--toolbarbutton-inner-padding) - 1px);
--toolbarbutton-border-radius: 2px;
@@ -109,21 +107,16 @@
#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar) {
background-color: var(--toolbar-bgcolor);
background-image: var(--toolbar-bgimage);
background-clip: padding-box;
color: var(--toolbar-color, inherit);
}
-#toolbar-menubar,
-#TabsToolbar {
- color: var(--titlebar-text-color);
-}
-
/*
* Windows 7 draws the chrome background color as the tab background
* instead of in the tabs toolbar.
*/
@media (-moz-os-version: windows-win7) {
@media (-moz-windows-default-theme) {
#navigator-toolbox:not(:-moz-lwtheme) {
--tabs-border-color: @glassShadowColor@;
@@ -165,22 +158,22 @@
}
}
@media (-moz-windows-compositor: 0),
(-moz-windows-default-theme: 0) {
/* Please keep the menu text colors in this media block in sync with
* compacttheme.css, minus the :not(:-moz-lwtheme) condition - see Bug 1165718.
*/
- :root[tabsintitlebar]:not([inFullscreen]):not(:-moz-lwtheme) {
- --titlebar-text-color: CaptionText;
+ :root[tabsintitlebar]:not([inFullscreen]) .titlebar-color:not(:-moz-lwtheme) {
+ color: CaptionText;
}
- :root[tabsintitlebar]:not([inFullscreen]):not(:-moz-lwtheme):-moz-window-inactive {
- --titlebar-text-color: InactiveCaptionText;
+ :root[tabsintitlebar]:not([inFullscreen]) .titlebar-color:not(:-moz-lwtheme):-moz-window-inactive {
+ color: InactiveCaptionText;
}
}
@media (-moz-windows-compositor: 0) {
#main-window[tabsintitlebar] #titlebar:-moz-lwtheme {
visibility: hidden;
}
--- a/browser/themes/windows/compacttheme.css
+++ b/browser/themes/windows/compacttheme.css
@@ -122,22 +122,22 @@
#TabsToolbar,
#navigator-toolbox {
background-color: transparent;
}
/* Use proper menu text styling in Win7 classic mode (copied from browser.css) */
@media (-moz-windows-compositor: 0),
(-moz-windows-default-theme: 0) {
- :root[tabsintitlebar]:not([inFullscreen]) {
- --titlebar-text-color: CaptionText;
+ :root[tabsintitlebar]:not([inFullscreen]) .titlebar-color {
+ color: CaptionText;
}
- :root[tabsintitlebar]:not([inFullscreen]):-moz-window-inactive {
- --titlebar-text-color: InactiveCaptionText;
+ :root[tabsintitlebar]:not([inFullscreen]) .titlebar-color:-moz-window-inactive {
+ color: InactiveCaptionText;
}
#main-window[tabsintitlebar] #main-menubar > menu {
color: inherit;
}
}
}