From b73dc1ea5ae13418644be1e5d4208c1e09dcbef3 Mon Sep 17 00:00:00 2001 From: "Abdoulaye O. Ly" Date: Thu, 31 Jan 2019 18:54:16 +0000 Subject: [PATCH] Bug 1515686 - Set multiselected tabs to have the same design spec as active tabs wih a translucent colour (current text colour at 0.2 alpha) on top. r=jaws,dao 1. Selected tabs inherit the same colors as active tabs. 2. On top of that, it's added a translucent (0.2 alpha) overlay : 2.1. For selected tabs with dark text, the overlay color is black (#000000) 2.2. For selected tabs with bright text, the overlay color is white (#ffffff) 3. On hover, the overlay becomes just more translucent with its value going down to 0.1 alpha. Differential Revision: https://phabricator.services.mozilla.com/D16097 --HG-- extra : moz-landing-system : lando --- browser/base/content/tabbrowser.xml | 4 ++-- browser/themes/shared/tabs.inc.css | 28 ++++++++++++------------- browser/themes/windows/compacttheme.css | 5 ++--- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 838f5de3af87..d5054110ff3e 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -1907,11 +1907,11 @@ extends="chrome://global/content/bindings/tabbox.xml#tab"> - - + .tab-background-inner { + background: currentColor; + opacity: .2; +} + .tab-line[multiselected], .tab-line[selected=true] { background-color: var(--tab-line-color); @@ -511,6 +519,7 @@ */ /* Lightweight theme on tabs */ +#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background[multiselected=true]:-moz-lwtheme, #tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background[selected=true]:-moz-lwtheme { background-attachment: scroll, scroll, fixed; background-color: transparent; @@ -524,11 +533,11 @@ /* Tab hover */ -.tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]) { +.tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]):not([multiselected]) { background-color: rgba(0,0,0,.1); } -#TabsToolbar[brighttext] .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]) { +#TabsToolbar[brighttext] .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]):not([multiselected]) { background-color: rgba(255,255,255,.1); } @@ -548,21 +557,10 @@ background-color: rgba(255,255,255,.2); } -.tabbrowser-tab:hover > .tab-stack > .tab-background > .tab-line:not([selected=true])[multiselected], -#TabsToolbar[brighttext] .tabbrowser-tab:hover > .tab-stack > .tab-background > .tab-line:not([selected=true])[multiselected] { +.tabbrowser-tab:hover > .tab-stack > .tab-background > .tab-line[multiselected]:not([selected=true]) { opacity: 0.5; } -/* Tab multi-selected */ - -.tabbrowser-tab[multiselected] > .tab-stack > .tab-background:not([selected=true]) { - background-color: rgba(0,0,0,.1); -} - -#TabsToolbar[brighttext] .tabbrowser-tab[multiselected] > .tab-stack > .tab-background:not([selected=true]) { - background-color: rgba(255,255,255,.1); -} - /* Pinned tabs */ /* Pinned tab separators need position: absolute when positioned (during overflow). */ diff --git a/browser/themes/windows/compacttheme.css b/browser/themes/windows/compacttheme.css index 384d2fe79838..5c95fff416c1 100644 --- a/browser/themes/windows/compacttheme.css +++ b/browser/themes/windows/compacttheme.css @@ -51,9 +51,8 @@ /* Because we're forcing the tabs toolbar to be [brighttext] to * get white toolbar button icons, we need to manually set the - * correct color for the tab hover and multiselect state for the light theme. */ - .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]):-moz-lwtheme-darktext, - .tabbrowser-tab[multiselected] > .tab-stack > .tab-background:not([selected=true]):-moz-lwtheme-darktext { + * correct color for the tab hover state for the light theme. */ + .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]):not([multiselected]):-moz-lwtheme-darktext { background-color: rgba(0,0,0,.1) !important; } .tabbrowser-tab:hover > .tab-stack > .tab-background > .tab-line:not([selected=true]):not([multiselected]):-moz-lwtheme-darktext {