From 033d567f0b375635d2b644360e1421251db44110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A3o=20Gottwald?= Date: Tue, 18 Sep 2018 20:24:43 +0200 Subject: [PATCH] Bug 1492130 - Load toolbarbutton.css as a document stylesheet. r=paolo --- .../themes/shared/toolbarbutton-icons.inc.css | 2 +- browser/themes/shared/toolbarbuttons.inc.css | 2 +- toolkit/content/widgets.css | 1 + toolkit/content/widgets/toolbarbutton.xml | 4 ---- toolkit/themes/linux/global/toolbarbutton.css | 16 ++++------------ toolkit/themes/osx/global/toolbarbutton.css | 8 +++----- toolkit/themes/windows/global/toolbarbutton.css | 4 ++-- 7 files changed, 12 insertions(+), 25 deletions(-) diff --git a/browser/themes/shared/toolbarbutton-icons.inc.css b/browser/themes/shared/toolbarbutton-icons.inc.css index b913e11f19d0..41c2f8b92912 100644 --- a/browser/themes/shared/toolbarbutton-icons.inc.css +++ b/browser/themes/shared/toolbarbutton-icons.inc.css @@ -13,7 +13,7 @@ toolbar[brighttext] { .toolbarbutton-animatable-box, .toolbarbutton-1 { - color: inherit; + color: inherit !important; -moz-context-properties: fill, fill-opacity; fill: var(--lwt-toolbarbutton-icon-fill, currentColor); fill-opacity: var(--toolbarbutton-icon-fill-opacity); diff --git a/browser/themes/shared/toolbarbuttons.inc.css b/browser/themes/shared/toolbarbuttons.inc.css index 70d590f174b3..4b02d96e7146 100644 --- a/browser/themes/shared/toolbarbuttons.inc.css +++ b/browser/themes/shared/toolbarbuttons.inc.css @@ -63,7 +63,7 @@ toolbar[brighttext] { } .toolbarbutton-1 > .toolbarbutton-icon { - margin-inline-end: 0; + margin-inline-end: 0 !important; } .toolbarbutton-1 > .toolbarbutton-icon, diff --git a/toolkit/content/widgets.css b/toolkit/content/widgets.css index 18b26393c6e1..8604471d70ac 100644 --- a/toolkit/content/widgets.css +++ b/toolkit/content/widgets.css @@ -23,4 +23,5 @@ @import url("chrome://global/skin/splitter.css"); @import url("chrome://global/skin/tabbox.css"); @import url("chrome://global/skin/toolbar.css"); +@import url("chrome://global/skin/toolbarbutton.css"); @import url("chrome://global/skin/wizard.css"); diff --git a/toolkit/content/widgets/toolbarbutton.xml b/toolkit/content/widgets/toolbarbutton.xml index ddecb96f4c3b..4950503bb18a 100644 --- a/toolkit/content/widgets/toolbarbutton.xml +++ b/toolkit/content/widgets/toolbarbutton.xml @@ -11,10 +11,6 @@ - - - - diff --git a/toolkit/themes/linux/global/toolbarbutton.css b/toolkit/themes/linux/global/toolbarbutton.css index 7775696878e2..889b11bfd125 100644 --- a/toolkit/themes/linux/global/toolbarbutton.css +++ b/toolkit/themes/linux/global/toolbarbutton.css @@ -28,7 +28,7 @@ toolbarbutton { } .toolbarbutton-text { - margin: 0 !important; /* !important for overriding global.css */ + margin: 0; text-align: center; } @@ -40,7 +40,7 @@ toolbarbutton:hover { color: -moz-buttonhovertext; } -toolbarbutton:hover:active, +toolbarbutton:hover:active:not([disabled="true"]), toolbarbutton[open="true"] { padding-top: 4px; padding-bottom: 2px; @@ -49,11 +49,7 @@ toolbarbutton[open="true"] { color: ButtonText; } -toolbarbutton[disabled="true"], -toolbarbutton[disabled="true"]:hover, -toolbarbutton[disabled="true"]:hover:active, -toolbarbutton[disabled="true"][open="true"] { - padding: 3px; +toolbarbutton[disabled="true"] { color: GrayText; } @@ -68,11 +64,7 @@ toolbarbutton:-moz-lwtheme:not(:hover):not([checked="true"]):not([open="true"]): /* ::::: toolbarbutton menu ::::: */ .toolbarbutton-menu-dropmarker { - -moz-appearance: toolbarbutton-dropdown !important; -} - -.toolbarbutton-menu-dropmarker[disabled="true"] { - padding: 0 !important; + -moz-appearance: toolbarbutton-dropdown; } /* ::::: toolbarbutton badged ::::: */ diff --git a/toolkit/themes/osx/global/toolbarbutton.css b/toolkit/themes/osx/global/toolbarbutton.css index 9b9c4487eabb..acc955465cc5 100644 --- a/toolkit/themes/osx/global/toolbarbutton.css +++ b/toolkit/themes/osx/global/toolbarbutton.css @@ -13,8 +13,8 @@ toolbarbutton { } .toolbarbutton-text { - margin: 0 !important; /* !important for overriding global.css */ - padding: 0px; + margin: 0; + padding: 0; text-align: center; vertical-align: middle; } @@ -29,7 +29,7 @@ toolbarbutton[disabled="true"][open="true"] { /* ::::: toolbarbutton menu ::::: */ .toolbarbutton-menu-dropmarker { - -moz-appearance: none !important; + -moz-appearance: none; list-style-image: url("chrome://global/skin/arrow/arrow-dn.png"); padding-inline-start: 2px; width: auto; @@ -37,8 +37,6 @@ toolbarbutton[disabled="true"][open="true"] { .toolbarbutton-menu-dropmarker[disabled="true"] { list-style-image: url("chrome://global/skin/arrow/arrow-dn-dis.png"); - padding: 0; - padding-inline-start: 2px; } /* ::::: toolbarbutton badged ::::: */ diff --git a/toolkit/themes/windows/global/toolbarbutton.css b/toolkit/themes/windows/global/toolbarbutton.css index 3ea7c3f75d85..ef7d8b6d214a 100644 --- a/toolkit/themes/windows/global/toolbarbutton.css +++ b/toolkit/themes/windows/global/toolbarbutton.css @@ -24,7 +24,7 @@ toolbarbutton { } .toolbarbutton-text { - margin: 0 !important; /* !important for overriding global.css */ + margin: 0; text-align: center; } @@ -91,7 +91,7 @@ toolbarbutton[checked="true"]:not([disabled="true"]) { /* ::::: toolbarbutton menu ::::: */ .toolbarbutton-menu-dropmarker { - -moz-appearance: none !important; + -moz-appearance: none; list-style-image: url("chrome://global/skin/icons/arrow-dropdown-12.svg"); -moz-context-properties: fill; fill: currentColor;