summaryrefslogtreecommitdiffstats
path: root/toolkit/themes/osx/global/menu.css
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/themes/osx/global/menu.css')
-rw-r--r--toolkit/themes/osx/global/menu.css185
1 files changed, 185 insertions, 0 deletions
diff --git a/toolkit/themes/osx/global/menu.css b/toolkit/themes/osx/global/menu.css
new file mode 100644
index 0000000000..30e3f3cfb4
--- /dev/null
+++ b/toolkit/themes/osx/global/menu.css
@@ -0,0 +1,185 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+@import url("chrome://global/skin/menu-scrolling.css");
+
+@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+menu,
+menuitem,
+menucaption {
+ appearance: auto;
+ -moz-default-appearance: menuitem;
+ -moz-font-smoothing-background-color: -moz-mac-menuitem;
+ flex-shrink: 0;
+ align-items: center;
+ list-style-image: none;
+ padding: 2px 21px;
+}
+
+menu[disabled="true"], menuitem[disabled="true"],
+menu[_moz-menuactive="true"][disabled="true"],
+menuitem[_moz-menuactive="true"][disabled="true"] {
+ color: -moz-mac-menutextdisable;
+ -moz-font-smoothing-background-color: -moz-mac-menuitem;
+}
+
+menuitem[default="true"],
+menuitem.spell-suggestion,
+menucaption {
+ font-weight: bold;
+}
+
+/* Internal content */
+
+.menu-text,
+.menu-iconic-text,
+.menu-accel,
+.menu-iconic-accel {
+ margin: 0 !important;
+}
+
+.menu-iconic-icon {
+ height: 16px;
+ margin-block: -2px;
+ margin-inline-end: 5px;
+ /* Empty icons shouldn't take up room, so we need to compensate
+ * the 5px margin-end with a negative margin-start.
+ */
+ margin-inline-start: -5px;
+}
+
+/* menuitems with icons */
+.menuitem-iconic,
+.menu-iconic,
+menuitem[image] {
+ /* 2px higher than those without icons */
+ padding-block: 1px 3px;
+}
+
+.menuitem-iconic > .menu-iconic-left > .menu-iconic-icon,
+.menu-iconic > .menu-iconic-left > .menu-iconic-icon,
+menuitem[image] > .menu-iconic-left > .menu-iconic-icon {
+ margin-inline-start: 0;
+ width: 16px;
+}
+
+/* menu arrow box */
+
+.menu-right,
+.menu-accel-container {
+ margin-inline: 21px -9px;
+ justify-content: flex-end;
+}
+
+.menu-right {
+ list-style-image: none;
+ appearance: auto;
+ -moz-default-appearance: menuarrow;
+}
+
+/* menu/menuitems in menubar */
+
+menubar > menu {
+ appearance: none;
+ padding-block: 2px;
+ padding-inline: 7px 5px;
+ margin: 1px 0;
+}
+
+menubar > menu[_moz-menuactive="true"] {
+ color: inherit;
+ background-color: transparent;
+}
+
+menubar > menu[_moz-menuactive="true"][open="true"] {
+ appearance: auto;
+ -moz-default-appearance: menuitem;
+ -moz-font-smoothing-background-color: -moz-mac-active-menuitem;
+ color: -moz-mac-menutextselect;
+}
+
+/* Internal content */
+
+.menubar-left {
+ margin: 0 2px;
+}
+
+.menubar-text {
+ margin: 0 1px !important;
+}
+
+/* menu/menuitems in popups */
+
+menupopup {
+ /* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
+ font: -moz-pull-down-menu;
+}
+
+menupopup > menu,
+menupopup > menuitem,
+menupopup > menucaption {
+ max-width: 42em;
+}
+
+menu[_moz-menuactive="true"],
+menuitem[_moz-menuactive="true"] {
+ -moz-font-smoothing-background-color: -moz-mac-active-menuitem;
+ color: -moz-mac-menutextselect;
+ background-color: SelectedItem;
+}
+
+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;
+}
+
+/* checked menuitems */
+
+:not(menulist) > menupopup > menuitem:is([checked="true"], [selected="true"]) {
+ appearance: auto;
+ -moz-default-appearance: checkmenuitem;
+}
+
+menulist > menupopup > menuitem {
+ padding-inline: 0;
+}
+
+/* We only show the ::before pseudo-element, but we'd like the spacing to be
+ * symmetric, so we render an invisible checkmark on both sides in order to
+ * reserve the right amount of space. */
+menulist > menupopup > menuitem::after,
+menulist > menupopup > menuitem::before {
+ content: '\2713'; /* a checkmark */
+ display: inline-block;
+ vertical-align: middle;
+ line-height: 0;
+ visibility: hidden;
+ padding-inline: 4px;
+}
+
+menulist > menupopup > menuitem:is([checked="true"], [selected="true"])::before {
+ visibility: inherit;
+}
+
+/* menuseparator */
+
+menuseparator {
+ appearance: auto;
+ -moz-default-appearance: menuseparator;
+ margin: 5px 0;
+ padding: 1px 0;
+}