summaryrefslogtreecommitdiffstats
path: root/comm/mail/base/content/webextensions.css
blob: 8245fb5183e860dc83b9f4df6c5091c8c6ebc797 (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
/* 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/. */

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

/* Rules to help integrate WebExtension buttons */

.webextension-action > .toolbarbutton-badge-stack > .toolbarbutton-icon {
  height: 18px;
  width: 18px;
}

@media not all and (min-resolution: 1.1dppx) {
  /* for browserAction, composeAction and messageAction */
  :root .spaces-addon-menuitem,
  .webextension-action {
    list-style-image: var(--webextension-toolbar-image, inherit);
  }

  /* for buttons in sidebar or sidebar menu */
  :root .spaces-addon-button img {
    content: var(--webextension-toolbar-image, inherit);
  }

  :root .spaces-addon-menuitem:-moz-lwtheme,
  .webextension-action:-moz-lwtheme {
    list-style-image: var(--webextension-toolbar-image-dark, inherit);
  }

  :root .spaces-addon-button:-moz-lwtheme img {
    content: var(--webextension-toolbar-image-dark, inherit);
  }

  @media (prefers-color-scheme: dark) {
    :root .spaces-addon-menuitem,
    .webextension-action {
      list-style-image: var(--webextension-toolbar-image-light, inherit) !important;
    }

    :root .spaces-addon-button img {
      content: var(--webextension-toolbar-image-light, inherit) !important;
    }
  }

  .webextension-action[cui-areatype="menu-panel"] {
    list-style-image: var(--webextension-menupanel-image, inherit);
  }
  :root[lwt-popup-brighttext] .webextension-action[cui-areatype="menu-panel"] {
    list-style-image: var(--webextension-menupanel-image-light, inherit);
  }
  :root:not([lwt-popup-brighttext]) .webextension-action[cui-areatype="menu-panel"]:-moz-lwtheme {
    list-style-image: var(--webextension-menupanel-image-dark, inherit);
  }

  .webextension-menuitem {
    list-style-image: var(--webextension-menuitem-image, inherit) !important;
  }
}

/* for displays, like Retina > 1.1dppx */
@media (min-resolution: 1.1dppx) {
  :root .spaces-addon-menuitem,
  .webextension-action {
    list-style-image: var(--webextension-toolbar-image-2x, inherit);
  }

  :root .spaces-addon-button img {
    content: var(--webextension-toolbar-image-2x, inherit);
  }

  :root .spaces-addon-menuitem:-moz-lwtheme,
  .webextension-action:-moz-lwtheme {
    list-style-image: var(--webextension-toolbar-image-2x-dark, inherit);
  }

  :root .spaces-addon-button:-moz-lwtheme img {
    content: var(--webextension-toolbar-image-2x-dark, inherit);
  }

  @media (prefers-color-scheme: dark) {
    :root .spaces-addon-menuitem,
    .webextension-action {
      list-style-image: var(--webextension-toolbar-image-2x-light, inherit) !important;
    }

    :root .spaces-addon-button img {
      content: var(--webextension-toolbar-image-2x-light, inherit) !important;
    }
  }

  .webextension-action[cui-areatype="menu-panel"] {
    list-style-image: var(--webextension-menupanel-image-2x, inherit);
  }
  :root[lwt-popup-brighttext] .webextension-action[cui-areatype="menu-panel"] {
    list-style-image: var(--webextension-menupanel-image-2x-light, inherit);
  }
  :root:not([lwt-popup-brighttext]) .webextension-action[cui-areatype="menu-panel"]:-moz-lwtheme {
    list-style-image: var(--webextension-menupanel-image-2x-dark, inherit);
  }

  .webextension-menuitem {
    list-style-image: var(--webextension-menuitem-image-2x, inherit) !important;
  }
}