summaryrefslogtreecommitdiffstats
path: root/comm/mail/themes/windows/mail/contextMenu.css
blob: efec4e8ec91084224ef1a91c288bc35656645e33 (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
/* 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://messenger/skin/shared/contextMenu.css");

/* Disabled empty item looks too small otherwise, because it has no icon. */
menuitem[disabled="true"]:not(.menuitem-iconic) {
  /* This is 16px for an icon + 3px for its margins + 1px for its padding +
   * 2px for its border. */
  min-height: 22px;
}

menupopup:not([type="arrow"]) {
  margin: -4px;
}

@media (prefers-contrast) {
  menupopup:not(:-moz-lwtheme) > :is(menu, menuitem):not([disabled="true"])[_moz-menuactive] {
    color: SelectedItemText;
  }
}

@media (-moz-windows-non-native-menus) {
  menupopup[needsgutter] menu:not([icon], .menu-iconic),
  menupopup[needsgutter] menuitem:not([checked="true"], [icon], .menuitem-iconic) {
    padding-inline-start: 32px;
  }

  menupopup > :is(menu, menuitem):not([needsgutter]) >
    menuitem:not([icon], .menuitem-iconic) {
    padding-inline-start: 1em;
  }

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

@media (-moz-windows-non-native-menus: 0) {
  menupopup {
    appearance: none;
    background-color: transparent;
    border: none;
    /* Somehow the double border radius is needed to look correct. */
    border-radius: calc(2 * var(--arrowpanel-border-radius));
  }

  menupopup:not([type="arrow"])::part(content) {
    --panel-shadow-margin: 4px;
    --panel-shadow: 0 0 4px hsla(0, 0%, 0%, 0.2);
  }

  /* Override popup.css */
  menulist > menupopup {
    --panel-background: var(--arrowpanel-background);
    --panel-border-color: var(--arrowpanel-border-color);
  }

  :is(.menuitem-iconic, .menu-iconic) > .menu-iconic-left,
  menupopup > menuitem:is([type="checkbox"],[type="radio"]) > .menu-iconic-left,
  menupopup > menuitem > .menu-text {
    appearance: none;
  }

  menuitem[checked="true"] > .menu-iconic-left > .menu-iconic-icon {
    display: block;
  }

  .menu-text, .menu-iconic-text,
  menupopup > :is(menu, menuitem) > .menu-text {
    margin-inline-start: 8px !important;
  }
}