summaryrefslogtreecommitdiffstats
path: root/toolkit/themes/windows/global/menu.css
blob: 4868f41ed12f8572ac63502297e075f94012af9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/* 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-shared.css");

/* ===== menu.css =======================================================
  == Styles used by XUL menu-related elements.
  ======================================================================= */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

/* ::::: menu/menuitem ::::: */

menubar > menu:-moz-window-inactive {
  color: ThreeDShadow;
}

/* ..... Internal content .... */

.menu-accel,
.menu-iconic-accel,
.menu-text,
.menu-iconic-text {
  margin: 0;
  padding: 1px 0;
}

.menu-accel,
.menu-iconic-accel {
  margin-inline: 0.74em 1.35em;
}

.menu-iconic-icon {
  width: 16px;
  height: 16px;
}

.menu-iconic > .menu-iconic-left,
.menuitem-iconic > .menu-iconic-left {
  padding-top: 2px;
}

menuitem:is([type="checkbox"], [type="radio"]):not([checked="true"]) > .menu-iconic-left > .menu-iconic-icon {
  display: none;
}

/* ::::: menu/menuitems in menubar ::::: */

menubar > menu[_moz-menuactive="true"]:not([disabled="true"]) {
  color: -moz-menubarhovertext;
}

menubar > menu:-moz-lwtheme {
  appearance: none;
  border-color: transparent;
}

menubar > menu:-moz-lwtheme:not([disabled="true"]) {
  color: inherit;
}

menubar > menu:-moz-lwtheme[_moz-menuactive="true"]:not([disabled="true"]) {
  background-color: SelectedItem;
  color: SelectedItemText;
  text-shadow: none;
}

/* ..... internal content .... */

.menubar-text {
  margin: 1px 6px 2px;
}

/* ::::: menu/menuitems in menulist popups ::::: */

menulist > menupopup > menuitem,
menulist > menupopup > menucaption,
menulist > menupopup > menu {
  max-width: none;
}

menulist > menupopup > menuitem {
  padding-inline-end: 1em;
}


menulist > menupopup > menuitem > .menu-iconic-left,
menulist > menupopup > menucaption > .menu-iconic-left,
menulist > menupopup > menu > .menu-iconic-left {
  display: none;
}

menulist > menupopup > menuitem > label,
menulist > menupopup > menucaption > label,
menulist > menupopup > menu > label {
  padding-block: 0;
}

menulist > menupopup > menuitem[_moz-menuactive="true"][disabled="true"] {
  color: GrayText;
}

menulist > menupopup > :is(menuitem, menucaption):not(.menuitem-iconic) > .menu-iconic-text {
  margin: 0;
}

/* ::::: checkbox and radio menuitems ::::: */

menupopup[needsgutter] menu:not([icon], .menu-iconic),
menupopup[needsgutter] menuitem:not([checked="true"], [icon], .menuitem-iconic) {
  padding-inline-start: 36px;
}

.menu-iconic > .menu-iconic-left,
.menuitem-iconic > .menu-iconic-left {
  margin-inline-end: 8px;
}

menuitem[checked="true"] {
  padding-inline-start: 12px;
}

/* We need to do something to override the default style for selected
   checkboxes and radio buttons because the native drawing we use on other
   Windows versions looks pretty bad with the Win10 styles, so for now we'll
   insert a generic checkmark icon for both types. */
menuitem[checked="true"] > .menu-iconic-left {
  -moz-context-properties: fill, fill-opacity;
  fill: currentColor;
  fill-opacity: var(--menu-icon-opacity);
  list-style-image: url("chrome://global/skin/icons/menu-check.svg");
  width: 16px;
  margin-inline-end: 8px;
}

/* ::::: menuseparator ::::: */

menuseparator {
  /* The side padding should align with the start of the menu item text. */
  padding-inline: 1em;
}