Bug 1706496 - Specify background along with color for menupopups. r=desktop-theme-reviewers,dao
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 21 Apr 2021 13:42:20 +0000
changeset 576960 593396efa9385dc05a072be49ed6bceda05efdf1
parent 576959 8908151379dc2ae9f5594558ede67711e3617010
child 576961 a016a1cc626e602314b544bff3a9608b8eb5831b
push id141643
push userealvarez@mozilla.com
push dateWed, 21 Apr 2021 14:58:42 +0000
treeherderautoland@593396efa938 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdesktop-theme-reviewers, dao
bugs1706496
milestone90.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1706496 - Specify background along with color for menupopups. r=desktop-theme-reviewers,dao Otherwise the menupopup retains the native "Menu" color, which inherits to menuitems, and can cause contrast issues for HCM users. It also makes more sense to specify color along with background anyways. Differential Revision: https://phabricator.services.mozilla.com/D112909
toolkit/themes/osx/global/menu.css
toolkit/themes/shared/in-content/common.inc.css
toolkit/themes/windows/global/menu.css
--- a/toolkit/themes/osx/global/menu.css
+++ b/toolkit/themes/osx/global/menu.css
@@ -130,23 +130,23 @@ menuitem[_moz-menuactive="true"] {
 menuitem[customoptionstyling="true"] {
   appearance: none;
 }
 
 /* menu/menuitems in menulist popups */
 
 menulist > menupopup {
   font: inherit;
+  color: FieldText;
 }
 
 menulist > menupopup > menuitem,
 menulist > menupopup > menucaption,
 menulist > menupopup > menu {
   max-width: none;
-  color: FieldText;
 }
 
 /* checked menuitems */
 
 :not(menulist) > menupopup > menuitem[checked="true"],
 :not(menulist) > menupopup > menuitem[selected="true"] {
   appearance: auto;
   -moz-default-appearance: checkmenuitem;
--- a/toolkit/themes/shared/in-content/common.inc.css
+++ b/toolkit/themes/shared/in-content/common.inc.css
@@ -583,23 +583,23 @@ xul|menulist::part(dropmarker-icon) {
   height: 12px;
 }
 
 xul|menulist > xul|menupopup {
   appearance: none;
   border: 1px solid var(--in-content-box-border-color);
   border-radius: 2px;
   background-color: var(--in-content-box-background);
+  color: var(--in-content-text-color);
 }
 
 xul|menulist > xul|menupopup xul|menu,
 xul|menulist > xul|menupopup xul|menuitem {
   appearance: none;
   font-size: 1em;
-  color: var(--in-content-text-color);
   padding-block: 0.2em;
   padding-inline: 10px 30px;
 }
 
 xul|menulist > xul|menupopup > xul|menu:not([disabled="true"])[_moz-menuactive="true"],
 xul|menulist > xul|menupopup > xul|menuitem:not([disabled="true"])[_moz-menuactive="true"] {
   color: var(--in-content-item-hover-text);
   background-color: var(--in-content-item-hover);
--- a/toolkit/themes/windows/global/menu.css
+++ b/toolkit/themes/windows/global/menu.css
@@ -246,26 +246,26 @@ menuitem[_moz-menuactive="true"] {
   }
 }
 }
 
 /* ::::: menu/menuitems in menulist popups ::::: */
 
 menulist > menupopup {
   font: inherit;
+  color: FieldText;
 }
 
 menulist > menupopup > menuitem,
 menulist > menupopup > menucaption,
 menulist > menupopup > menu {
   appearance: none !important;
   border: 1px solid transparent;
   padding-inline: 5px;
   max-width: none;
-  color: FieldText;
 }
 
 menulist > menupopup > menuitem[_moz-menuactive="true"],
 menulist > menupopup > menu[_moz-menuactive="true"] {
   background-color: highlight;
   color: highlighttext;
 }