diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js index 13d0b0fbe8a8..9f993da70169 100644 --- a/browser/base/content/browser-addons.js +++ b/browser/base/content/browser-addons.js @@ -808,7 +808,7 @@ var LightweightThemeListener = { /** * Set the headerImage to a CSS variable which is used to apply the background-image - * property of the respective rulesets in tabs.inc.css. + * property of all rulesets in browser-lightweightTheme.css. * * @param headerImage - a string containing a CSS image for the lightweight theme header. */ diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 4186ed19432a..baa9f6e9e1b8 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -13,6 +13,7 @@ + diff --git a/browser/themes/linux/browser-lightweightTheme.css b/browser/themes/linux/browser-lightweightTheme.css new file mode 100644 index 000000000000..27ac66c739e4 --- /dev/null +++ b/browser/themes/linux/browser-lightweightTheme.css @@ -0,0 +1,31 @@ +/* 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/. */ + +%include linuxShared.inc +%filter substitution + +/* + * LightweightThemeListener will set the current lightweight theme's header + * image to the lwt-header-image variable, used in each of the following rulesets. + */ + +/* Lightweight theme on tabs */ +#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-start[selected=true]:-moz-lwtheme::before, +#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-end[selected=true]:-moz-lwtheme::before { + background-attachment: scroll, fixed; + background-color: transparent; + background-image: @fgTabTextureLWT@, var(--lwt-header-image); + background-position: 0 0, right top; + background-repeat: repeat-x, no-repeat; +} + +#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[selected=true]:-moz-lwtheme { + background-attachment: scroll, scroll, fixed; + background-color: transparent; + background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png), + @fgTabTextureLWT@, + var(--lwt-header-image); + background-position: 0 0, 0 0, right top; + background-repeat: repeat-x, repeat-x, no-repeat; +} diff --git a/browser/themes/linux/jar.mn b/browser/themes/linux/jar.mn index c9ffd21ad0f2..0f7b738514c7 100644 --- a/browser/themes/linux/jar.mn +++ b/browser/themes/linux/jar.mn @@ -12,6 +12,7 @@ browser.jar: * skin/classic/browser/syncedtabs/sidebar.css (syncedtabs/sidebar.css) * skin/classic/browser/browser.css * skin/classic/browser/compacttheme.css +* skin/classic/browser/browser-lightweightTheme.css skin/classic/browser/click-to-play-warning-stripes.png skin/classic/browser/Info.png skin/classic/browser/menuPanel-customize.png diff --git a/browser/themes/osx/browser-lightweightTheme.css b/browser/themes/osx/browser-lightweightTheme.css new file mode 100644 index 000000000000..7b9587e1c9c3 --- /dev/null +++ b/browser/themes/osx/browser-lightweightTheme.css @@ -0,0 +1,38 @@ +/* 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/. */ + +%include shared.inc + +/* + * LightweightThemeListener will set the current lightweight theme's header + * image to the lwt-header-image variable, used in each of the following rulesets. + */ + +/* Lightweight theme on tabs */ +#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-start[selected=true]:-moz-lwtheme::before, +#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-end[selected=true]:-moz-lwtheme::before { + background-attachment: scroll, fixed; + background-color: transparent; + background-image: @fgTabTextureLWT@, var(--lwt-header-image); + background-position: 0 0, right top; + background-repeat: repeat-x, no-repeat; +} + +#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[selected=true]:-moz-lwtheme { + background-attachment: scroll, scroll, fixed; + background-color: transparent; + background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png), + @fgTabTextureLWT@, + var(--lwt-header-image); + background-position: 0 0, 0 0, right top; + background-repeat: repeat-x, repeat-x, no-repeat; +} + +@media (min-resolution: 2dppx) { + #tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[selected=true]:-moz-lwtheme { + background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle@2x.png), + @fgTabTextureLWT@, + var(--lwt-header-image); + } +} diff --git a/browser/themes/osx/jar.mn b/browser/themes/osx/jar.mn index 7431f03ecc21..36a28e4e1573 100644 --- a/browser/themes/osx/jar.mn +++ b/browser/themes/osx/jar.mn @@ -11,6 +11,7 @@ browser.jar: * skin/classic/browser/syncedtabs/sidebar.css (syncedtabs/sidebar.css) * skin/classic/browser/browser.css * skin/classic/browser/compacttheme.css +* skin/classic/browser/browser-lightweightTheme.css skin/classic/browser/click-to-play-warning-stripes.png skin/classic/browser/Info.png skin/classic/browser/keyhole-circle.png diff --git a/browser/themes/shared/tabs.inc.css b/browser/themes/shared/tabs.inc.css index 70fb8c943443..585fb2b976c2 100644 --- a/browser/themes/shared/tabs.inc.css +++ b/browser/themes/shared/tabs.inc.css @@ -383,18 +383,17 @@ } /* Selected tab lightweight theme styles. - See the "Lightweight theme on tabs" section of this file - for information about run-time changes to LWT styles. */ + See browser-lightweightTheme.css for information about run-time changes to LWT styles. */ .tab-background-middle[selected=true]:-moz-lwtheme { background-color: transparent; background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png), - @fgTabTextureLWT@; + @fgTabTextureLWT@;/*, + lwtHeader;*/ /* Don't stretch the LWT header images */ background-size: var(--tab-stroke-background-size), auto 100%, auto auto; } -/* These LWT styles are normally overridden by the "Lightweight theme on tabs" - section of this file. */ +/* These LWT styles are normally overridden by browser-lightweightTheme.css */ .tab-background-start[selected=true]:-moz-lwtheme::before, .tab-background-end[selected=true]:-moz-lwtheme::before { background-image: @fgTabTextureLWT@; @@ -406,31 +405,6 @@ background-color: transparent; } -/* - * LightweightThemeListener will set the current lightweight theme's header - * image to the lwt-header-image variable, used in each of the following rulesets. - */ - -/* Lightweight theme on tabs */ -#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-start[selected=true]:-moz-lwtheme::before, -#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-end[selected=true]:-moz-lwtheme::before { - background-attachment: scroll, fixed; - background-color: transparent; - background-image: @fgTabTextureLWT@, var(--lwt-header-image); - background-position: 0 0, right top; - background-repeat: repeat-x, no-repeat; -} - -#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[selected=true]:-moz-lwtheme { - background-attachment: scroll, scroll, fixed; - background-color: transparent; - background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png), - @fgTabTextureLWT@, - var(--lwt-header-image); - background-position: 0 0, 0 0, right top; - background-repeat: repeat-x, repeat-x, no-repeat; -} - /* End selected tab */ /* new tab button border and gradient on hover */ @@ -556,12 +530,6 @@ background-image: url(chrome://browser/skin/tabbrowser/tab-stroke-end@2x.png); } - #tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[selected=true]:-moz-lwtheme { - background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle@2x.png), - @fgTabTextureLWT@, - var(--lwt-header-image); - } - .tab-throbber[busy] { list-style-image: url("chrome://browser/skin/tabbrowser/connecting@2x.png"); } diff --git a/browser/themes/windows/browser-lightweightTheme.css b/browser/themes/windows/browser-lightweightTheme.css new file mode 100644 index 000000000000..b6c518d4a604 --- /dev/null +++ b/browser/themes/windows/browser-lightweightTheme.css @@ -0,0 +1,39 @@ +/* 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/. */ + +%include windowsShared.inc +%filter substitution + +/* + * LightweightThemeListener will set the current lightweight theme's header + * image to the lwt-header-image variable, used in each of the following rulesets. + */ + +/* Lightweight theme on tabs */ +#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-start[selected=true]:-moz-lwtheme::before, +#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-end[selected=true]:-moz-lwtheme::before { + background-attachment: scroll, fixed; + background-color: transparent; + background-image: @fgTabTextureLWT@, var(--lwt-header-image); + background-position: 0 0, right top; + background-repeat: repeat-x, no-repeat; +} + +#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[selected=true]:-moz-lwtheme { + background-attachment: scroll, scroll, fixed; + background-color: transparent; + background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png), + @fgTabTextureLWT@, + var(--lwt-header-image); + background-position: 0 0, 0 0, right top; + background-repeat: repeat-x, repeat-x, no-repeat; +} + +@media (min-resolution: 1.25dppx) { + #tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[selected=true]:-moz-lwtheme { + background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle@2x.png), + @fgTabTextureLWT@, + var(--lwt-header-image); + } +} diff --git a/browser/themes/windows/jar.mn b/browser/themes/windows/jar.mn index c94b0d559ae4..e8bc3358c331 100644 --- a/browser/themes/windows/jar.mn +++ b/browser/themes/windows/jar.mn @@ -11,6 +11,7 @@ browser.jar: * skin/classic/browser/syncedtabs/sidebar.css (syncedtabs/sidebar.css) * skin/classic/browser/browser.css * skin/classic/browser/compacttheme.css +* skin/classic/browser/browser-lightweightTheme.css skin/classic/browser/caption-buttons.svg skin/classic/browser/click-to-play-warning-stripes.png skin/classic/browser/Info.png