summaryrefslogtreecommitdiffstats
path: root/toolkit/themes/linux/global/menu.css
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /toolkit/themes/linux/global/menu.css
parentInitial commit. (diff)
downloadthunderbird-upstream.tar.xz
thunderbird-upstream.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/themes/linux/global/menu.css')
-rw-r--r--toolkit/themes/linux/global/menu.css156
1 files changed, 156 insertions, 0 deletions
diff --git a/toolkit/themes/linux/global/menu.css b/toolkit/themes/linux/global/menu.css
new file mode 100644
index 0000000000..f10c3a0f1e
--- /dev/null
+++ b/toolkit/themes/linux/global/menu.css
@@ -0,0 +1,156 @@
+/* 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");
+
+/* ===== menu.css =======================================================
+ == Styles used by XUL menu-related elements.
+ ======================================================================= */
+
+@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+/* ::::: menu/menuitem ::::: */
+
+menupopup,
+menubar {
+ font: menu;
+}
+
+menu,
+menuitem,
+menucaption {
+ border-radius: calc(var(--panel-border-radius) / 2);
+ align-items: center;
+ flex-shrink: 0;
+ padding: 4px 6px;
+ max-width: 42em;
+ list-style-image: none;
+}
+
+menu:where([_moz-menuactive]:not([disabled="true"])),
+menuitem:where([_moz-menuactive]:not([disabled="true"])) {
+ color: -moz-menuhovertext;
+ background-color: -moz-menuhover;
+}
+
+menu:where([disabled="true"]),
+menuitem:where([disabled="true"]),
+menucaption:where([disabled="true"]) {
+ color: GrayText;
+}
+
+menubar > menu {
+ color: inherit;
+ background-color: transparent;
+ border-radius: 0;
+ padding-bottom: 1px;
+ border-bottom: 3px solid transparent;
+}
+
+menubar > menu[open] {
+ border-bottom-color: AccentColor;
+}
+
+menuitem[default="true"],
+menuitem.spell-suggestion,
+menucaption {
+ font-weight: bold;
+}
+
+/* ::::: menu/menuitems in menulist popups ::::: */
+
+menulist > menupopup {
+ font: inherit;
+}
+
+menulist > menupopup > :is(menuitem, menucaption, menu) {
+ max-width: none;
+}
+
+/* ..... internal content .... */
+
+.menu-text,
+.menu-iconic-left,
+.menu-iconic-text {
+ margin-top: 0 !important;
+ margin-bottom: 0 !important;
+ margin-inline-start: 0 !important;
+ margin-inline-end: 2px !important;
+}
+
+.menu-text {
+ /* This is (18 + the size of end-padding on .menu-iconic-left)px */
+ margin-inline-start: 21px !important;
+}
+
+.menu-accel,
+.menu-iconic-accel {
+ margin-top: 0 !important;
+ margin-bottom: 0 !important;
+ margin-inline-start: 7px !important;
+}
+
+.menu-accel-container {
+ justify-content: flex-end;
+}
+
+.menu-iconic-left {
+ min-width: 16px;
+ /* We can only hardcode this, to make the default GTK icon<->label spacing */
+ padding-inline-end: 3px !important;
+}
+
+.menu-iconic-icon {
+ width: 16px;
+ height: 16px;
+}
+
+.menu-right {
+ margin-top: 0;
+ margin-bottom: 0;
+ margin-inline-start: 6px;
+ margin-inline-end: 0;
+ width: 1ex;
+ height: 1ex;
+ /* These next two rules are needed to prevent inheritance and thus ugliness */
+ list-style-image: none;
+ appearance: auto;
+ -moz-default-appearance: menuarrow;
+}
+
+.menubar-left {
+ margin-top: 0;
+ margin-bottom: 0;
+ margin-inline-start: 0;
+ margin-inline-end: 2px;
+}
+
+.menubar-text {
+ margin: 0 1px !important;
+}
+
+menulist > menupopup > :is(menuitem, menucaption, menu) > .menu-iconic-left {
+ display: none;
+}
+
+menuitem:is([type="checkbox"], [checked="true"]) .menu-iconic-icon {
+ appearance: auto;
+ -moz-default-appearance: checkbox;
+}
+
+menuitem[type="radio"] .menu-iconic-icon {
+ appearance: auto;
+ -moz-default-appearance: radio;
+}
+
+menuseparator {
+ margin-block: 2px;
+ border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent);
+}
+
+@media (prefers-contrast) {
+ menuseparator {
+ border-top-color: var(--panel-border-color);
+ }
+}