1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 @import url
("chrome://global/skin/menu-shared.css");
7 /* ===== menu.css =======================================================
8 == Styles used by XUL menu-related elements.
9 ======================================================================= */
11 @namespace url
("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
13 /* ::::: menu/menuitem ::::: */
15 menubar
> menu:-moz-window-inactive
{
19 /* ..... Internal content .... */
31 margin-inline: 0.74em 1.35em;
39 .menu-iconic
> .menu-iconic-left
,
40 .menuitem-iconic > .menu-iconic-left {
44 menuitem:is
([type
="checkbox"], [type
="radio"]):not
([checked
="true"]) > .menu-iconic-left
> .menu-iconic-icon
{
48 /* ::::: menu/menuitems in menubar ::::: */
50 menubar
> menu
[_moz-menuactive
="true"]:not
([disabled
="true"]) {
51 color: -moz-menubarhovertext
;
57 border-color: transparent
;
59 &:not
([disabled
="true"]) {
62 &[_moz-menuactive
="true"]:not
([disabled
="true"]) {
63 background-color: SelectedItem
;
64 color: SelectedItemText
;
71 /* ..... internal content .... */
77 /* ::::: menu/menuitems in menulist popups ::::: */
79 menulist
> menupopup
> menuitem
,
80 menulist
> menupopup
> menucaption
,
81 menulist
> menupopup
> menu
{
85 menulist
> menupopup
> menuitem
{
86 padding-inline-end: 1em;
90 menulist
> menupopup
> menuitem
> .menu-iconic-left
,
91 menulist
> menupopup
> menucaption
> .menu-iconic-left
,
92 menulist
> menupopup
> menu
> .menu-iconic-left
{
96 menulist
> menupopup
> menuitem
> label
,
97 menulist
> menupopup
> menucaption
> label
,
98 menulist
> menupopup
> menu
> label
{
102 menulist
> menupopup
> menuitem
[_moz-menuactive
="true"][disabled
="true"] {
106 menulist
> menupopup
> :is
(menuitem
, menucaption
):not
(.menuitem-iconic
) > .menu-iconic-text
{
110 /* ::::: checkbox and radio menuitems ::::: */
112 menupopup
[needsgutter
] menu:not
([icon
], .menu-iconic
),
113 menupopup
[needsgutter
] menuitem:not
([checked
="true"], [icon
], .menuitem-iconic
) {
114 padding-inline-start: 36px;
117 .menu-iconic
> .menu-iconic-left
,
118 .menuitem-iconic > .menu-iconic-left {
119 margin-inline-end: 8px;
122 menuitem
[checked
="true"] {
123 padding-inline-start: 12px;
126 /* We need to do something to override the default style for selected
127 checkboxes and radio buttons because the native drawing we use on other
128 Windows versions looks pretty bad with the Win10 styles, so for now we'll
129 insert a generic checkmark icon for both types. */
130 menuitem
[checked
="true"] > .menu-iconic-left
{
131 -moz-context-properties: fill
, fill-opacity
;
133 fill-opacity: var
(--menu-icon-opacity
);
134 list-style-image: url
("chrome://global/skin/icons/menu-check.svg");
136 margin-inline-end: 8px;
139 /* ::::: menuseparator ::::: */
142 /* The side padding should align with the start of the menu item text. */