From d74bc3c78ef4ea54b541cb9a349912b43014feb4 Mon Sep 17 00:00:00 2001 From: Rafael Mardojai CM Date: Sat, 8 Oct 2022 20:04:33 -0500 Subject: [PATCH] Tabsbar: Code tweaks --- theme/colors/dark.css | 2 ++ theme/colors/light.css | 2 ++ theme/parts/tabsbar.css | 15 +++++++-------- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/theme/colors/dark.css b/theme/colors/dark.css index e3fdf3b..a84664d 100644 --- a/theme/colors/dark.css +++ b/theme/colors/dark.css @@ -67,11 +67,13 @@ /* Tabs */ --gnome-tabbar-background: var(--gnome-headerbar-background); + --gnome-tabbar-tab-separator-color: var(--gnome-toolbar-border-color); --gnome-tabbar-tab-hover-background: #3f3f3f; /* Hardcoded color */ --gnome-tabbar-tab-active-background: #444444; /* Hardcoded color */ --gnome-tabbar-tab-active-background-contrast: #FAFAFA; --gnome-tabbar-tab-active-hover-background: #4b4b4b; /* Hardcoded color */ --gnome-inactive-tabbar-background: var(--gnome-inactive-headerbar-background); + --gnome-inactive-tabbar-tab-hover-background: #2c2c2c; /* Hardcoded color */ --gnome-inactive-tabbar-tab-active-background: #2e2e2e; /* Hardcoded color */ --gnome-tab-button-background: rgba(0, 0, 0, .5); --gnome-tab-button-hover-background: rgba(0, 0, 0, .6); diff --git a/theme/colors/light.css b/theme/colors/light.css index 17f425c..9509796 100644 --- a/theme/colors/light.css +++ b/theme/colors/light.css @@ -67,11 +67,13 @@ /* Tabs */ --gnome-tabbar-background: var(--gnome-headerbar-background); + --gnome-tabbar-tab-separator-color: var(--gnome-toolbar-border-color); --gnome-tabbar-tab-hover-background: #dedede; /* Hardcoded color */ --gnome-tabbar-tab-active-background: #d9d9d9; /* Hardcoded color */ --gnome-tabbar-tab-active-background-contrast: #4F4F4F; --gnome-tabbar-tab-active-hover-background: #d2d2d2; /* Hardcoded color */ --gnome-inactive-tabbar-background: var(--gnome-inactive-headerbar-background); + --gnome-inactive-tabbar-tab-hover-background: #f3f3f3; /* Hardcoded color */ --gnome-inactive-tabbar-tab-active-background: #f0f0f0; /* Hardcoded color */ --gnome-tab-button-background: rgba(255, 255, 255, .5); --gnome-tab-button-hover-background: rgba(255, 255, 255, .6); diff --git a/theme/parts/tabsbar.css b/theme/parts/tabsbar.css index ed51e0a..1485fab 100644 --- a/theme/parts/tabsbar.css +++ b/theme/parts/tabsbar.css @@ -134,7 +134,7 @@ spacer[part=overflow-start-indicator], spacer[part=overflow-end-indicator] { .tabbrowser-tab:not([selected], :hover, [last-visible-tab="true"], [beforeselected-visible="true"], [beforehovered="true"])::after { content: ""; display: block; - border-left: 1px solid var(--gnome-toolbar-border-color) !important; + border-left: 1px solid var(--gnome-tabbar-tab-separator-color) !important; height: 26px; position: absolute; top: 9px; @@ -325,7 +325,7 @@ tab { } /* Close button overlay */ -.tabbrowser-tab:not([pinned]) .tab-content::after, .tabbrowser-tab:not([pinned]) .tab-content::before { +.tabbrowser-tab:not([pinned]) .tab-content::before { border-radius: 0 6px 6px 0; content: ""; height: 100%; @@ -336,10 +336,6 @@ tab { transition: all 0.2s ease-out; width: 55px; } -.tabbrowser-tab:not([pinned]) .tab-content::after { - background: transparent; - z-index: 90; -} .tabbrowser-tab:not([pinned]) .tab-content::before { background: linear-gradient(to left, var(--gnome-tabbar-tab-close-overlay-bg) 50%, transparent); z-index: 99; @@ -378,7 +374,7 @@ tab { } /* Tab hover */ -:root:not(:-moz-window-inactive) .tabbrowser-tab:hover > .tab-stack > .tab-background[selected=true] { +.tabbrowser-tab:hover > .tab-stack > .tab-background[selected=true] { background-color: var(--gnome-tabbar-tab-active-hover-background) !important; } .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]), @@ -386,10 +382,13 @@ tab { #TabsToolbar[brighttext] > #tabbrowser-tabs > .tabbrowser-tab:hover > .tab-stack > .tab-background > .tab-line:not([selected=true]) { background-color: transparent !important; } -:root:not(:-moz-window-inactive) .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]) { +.tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]) { background-color: var(--gnome-tabbar-tab-hover-background) !important; border-image: none !important; } +:root:-moz-window-inactive .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]) { + background-color: var(--gnome-inactive-tabbar-tab-hover-background) !important; +} /* Full width tabs */ .tabbrowser-tab:not([style^="max-width"]):not([pinned]),