diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:44:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:44:51 +0000 |
commit | 9e3c08db40b8916968b9f30096c7be3f00ce9647 (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /browser/themes/shared/light-dark-overrides.css | |
parent | Initial commit. (diff) | |
download | thunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.tar.xz thunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/themes/shared/light-dark-overrides.css')
-rw-r--r-- | browser/themes/shared/light-dark-overrides.css | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/browser/themes/shared/light-dark-overrides.css b/browser/themes/shared/light-dark-overrides.css new file mode 100644 index 0000000000..5fa24219f5 --- /dev/null +++ b/browser/themes/shared/light-dark-overrides.css @@ -0,0 +1,110 @@ +/* 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/. */ + +#urlbar { + --urlbar-box-bgcolor: var(--toolbar-field-focus-background-color); + --urlbar-box-focus-bgcolor: var(--button-bgcolor); + --urlbar-box-hover-bgcolor: var(--button-hover-bgcolor); +} + +@media (-moz-platform: windows) { + /* The window background is white due to no accentcolor in the lightweight + theme. It can't be changed to transparent when there is no compositor + (Win 7 in classic / basic theme), or else dragging and focus become + broken. So instead just show the normal titlebar in that case, and override + the window color as transparent when the compositor is available. */ + @media (-moz-windows-compositor: 0) { + :root[tabsintitlebar]:not([inDOMFullscreen]) #titlebar:-moz-lwtheme { + visibility: visible; + } + + /* Prevent accent color overriding the window background for + * light and dark theme on Aero Basic. This is copied from browser-aero.css. */ + @media (-moz-windows-default-theme) { + :root { + background-color: rgb(185,209,234) !important; + } + :root:-moz-window-inactive { + background-color: rgb(215,228,242) !important; + } + } + } + + /* Add a fog for background tabs to be visible on Windows 7 glass window background */ + @media (-moz-platform: windows-win7) { + @media (-moz-windows-default-theme) { + #TabsToolbar { + background-image: radial-gradient(ellipse at bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.5) 80%, transparent); + color: black; + --toolbarbutton-icon-fill: currentColor; + } + } + } + + @media (-moz-windows-glass) { + /* Make the menubar text readable on aero glass (copied from browser-aero.css). */ + #toolbar-menubar { + text-shadow: 0 0 .5em white, 0 0 .5em white, 0 1px 0 rgba(255,255,255,.4); + } + + #main-menubar:not(:-moz-window-inactive) { + background-color: rgba(255,255,255,.5); + color: black; + border-radius: 4px; + } + } + + @media (-moz-platform: windows-win7), + (-moz-platform: windows-win8) { + @media (-moz-windows-compositor) { + :root { + background: transparent !important; + } + + /* Remove lwtheme borders from toolbars in non-maximized windows. */ + #toolbar-menubar, + #TabsToolbar { + border-inline-style: none !important; + } + } + + /* Use proper menu text styling in Win7 classic mode. On Windows 8, we use + these colors so tabs and menus are legible against the window accent color. + These colors are copied from browser.css. */ + @media (-moz-windows-compositor: 0), + (-moz-windows-default-theme: 0), + (-moz-platform: windows-win8) { + :root[tabsintitlebar] { + color: CaptionText; + } + + :root[tabsintitlebar]:-moz-window-inactive { + color: InactiveCaptionText; + } + } + } + + /* Restored windows get an artificial border on windows, because the lwtheme background + * overlaps the regular window border. That isn't the case for us, so we avoid painting + * over the native border with our custom borders. These are !important to avoid + * specificity-wars with the selectors that add these borders. */ + @media (-moz-windows-classic), + (-moz-windows-compositor: 0) and (-moz-windows-default-theme) { + #navigator-toolbox { + background-image: none !important; + } + } + @media (-moz-windows-glass) { + #navigator-toolbox { + border-top: none !important; + box-shadow: none !important; + padding-top: 0 !important; + } + } + @media (-moz-platform: windows-win8) { + #navigator-toolbox { + border-top: none !important; + } + } +} |