From 3fec26ea393b17eae5400fd0c63fa42f8e9bdfc6 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 17 Dec 2021 22:01:54 +0900 Subject: [PATCH] Clean: Separated to `color_like_toolbar.scss` --- src/tabbar/_color_like_toolbar.scss | 34 ++++++++++++++++++++++++++++ src/userChrome.scss | 35 +---------------------------- 2 files changed, 35 insertions(+), 34 deletions(-) create mode 100644 src/tabbar/_color_like_toolbar.scss diff --git a/src/tabbar/_color_like_toolbar.scss b/src/tabbar/_color_like_toolbar.scss new file mode 100644 index 0000000..2e646c0 --- /dev/null +++ b/src/tabbar/_color_like_toolbar.scss @@ -0,0 +1,34 @@ +:root:not(:-moz-lwtheme) { + /* Fix for windows's system default theme. Using --toolbar-bgcolor fallback */ + --tab-selected-bgcolor: unset !important; /* Original: rgb(255,255,255); */ +} +#tabbrowser-tabs:not([movingtab]) + > #tabbrowser-arrowscrollbox + > .tabbrowser-tab + > .tab-stack + > .tab-background[selected="true"]:-moz-lwtheme { + /* Original: linear-gradient(var(--lwt-selected-tab-background-color, transparent), var(--lwt-selected-tab-background-color, transparent)), linear-gradient(var(--toolbar-bgcolor), var(--toolbar-bgcolor)), var(--lwt-header-image, none) + */ + background-image: linear-gradient(transparent, transparent), + linear-gradient(var(--toolbar-bgcolor), var(--toolbar-bgcolor)), var(--lwt-header-image, none) !important; +} + +/* Multi Selected Color */ +#tabbrowser-tabs:not([movingtab]) + > #tabbrowser-arrowscrollbox + > .tabbrowser-tab + > .tab-stack + > .tab-background[multiselected]:not([selected]):-moz-lwtheme { + background-image: linear-gradient(var(--toolbar-bgcolor, transparent), var(--toolbar-bgcolor, transparent)), + linear-gradient(var(--toolbar-bgcolor), var(--toolbar-bgcolor)), var(--lwt-header-image, none) !important; +} + +.tab-background[multiselected="true"]:not([selected="true"]) > .tab-loading-burst:not([bursting]) { + background: color-mix(in srgb, currentColor 65%, transparent); + opacity: 0.3; +} +#TabsToolbar[brighttext] + .tab-background[multiselected="true"]:not([selected="true"]) + > .tab-loading-burst:not([bursting]) { + opacity: 0.15; +} diff --git a/src/userChrome.scss b/src/userChrome.scss index fb39087..baafa41 100644 --- a/src/userChrome.scss +++ b/src/userChrome.scss @@ -41,40 +41,7 @@ @import "tabbar/connect_to_window"; /** Selected Tab - Color like toolbar *****************************************/ -:root:not(:-moz-lwtheme) { - /* Fix for windows's system default theme. Using --toolbar-bgcolor fallback */ - --tab-selected-bgcolor: unset !important; /* Original: rgb(255,255,255); */ -} -#tabbrowser-tabs:not([movingtab]) - > #tabbrowser-arrowscrollbox - > .tabbrowser-tab - > .tab-stack - > .tab-background[selected="true"]:-moz-lwtheme { - /* Original: linear-gradient(var(--lwt-selected-tab-background-color, transparent), var(--lwt-selected-tab-background-color, transparent)), linear-gradient(var(--toolbar-bgcolor), var(--toolbar-bgcolor)), var(--lwt-header-image, none) - */ - background-image: linear-gradient(transparent, transparent), - linear-gradient(var(--toolbar-bgcolor), var(--toolbar-bgcolor)), var(--lwt-header-image, none) !important; -} - -/* Multi Selected Color */ -#tabbrowser-tabs:not([movingtab]) - > #tabbrowser-arrowscrollbox - > .tabbrowser-tab - > .tab-stack - > .tab-background[multiselected]:not([selected]):-moz-lwtheme { - background-image: linear-gradient(var(--toolbar-bgcolor, transparent), var(--toolbar-bgcolor, transparent)), - linear-gradient(var(--toolbar-bgcolor), var(--toolbar-bgcolor)), var(--lwt-header-image, none) !important; -} - -.tab-background[multiselected="true"]:not([selected="true"]) > .tab-loading-burst:not([bursting]) { - background: color-mix(in srgb, currentColor 65%, transparent); - opacity: 0.3; -} -#TabsToolbar[brighttext] - .tab-background[multiselected="true"]:not([selected="true"]) - > .tab-loading-burst:not([bursting]) { - opacity: 0.15; -} +@import "tabbar/color_like_toolbar"; /** Selected Tab - Box Shadow *************************************************/ #TabsToolbar[brighttext]