diff options
Diffstat (limited to '')
-rw-r--r-- | comm/mail/base/content/webextensions.css | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/comm/mail/base/content/webextensions.css b/comm/mail/base/content/webextensions.css new file mode 100644 index 0000000000..8245fb5183 --- /dev/null +++ b/comm/mail/base/content/webextensions.css @@ -0,0 +1,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; + } +} |