From e51de2a6765d28a996cde85aaf58923c5351e5a1 Mon Sep 17 00:00:00 2001 From: Gerome Matilla Date: Wed, 12 Aug 2020 15:14:46 +0800 Subject: [PATCH] fix centered tab close button --- userChrome.css | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/userChrome.css b/userChrome.css index 0d4cf27..3ae6cd4 100644 --- a/userChrome.css +++ b/userChrome.css @@ -14,7 +14,7 @@ --bf-urlbar-active-bg: var(--bf-bg); --bf-urlbar-results-url-color: var(--bf-color); - --bf-tab-background: #000000AA; + --bf-tab-toolbar-bg: #000000AA; --bf-tab-color: var(--bf-color); --bf-tab-selected-bg: var(--bf-bg); @@ -46,7 +46,7 @@ --bf-urlbar-active-bg: var(--bf-bg); --bf-urlbar-results-url-color: var(--bf-color); - --bf-tab-background: #F2F2F2AA; + --bf-tab-toolbar-bg: #F2F2F2AA; --bf-tab-color: var(--bf-color); --bf-tab-selected-bg: var(--bf-bg); @@ -78,7 +78,7 @@ --bf-urlbar-active-bg: var(--bf-urlbar-bg); --bf-urlbar-results-url-color: var(--bf-color); - --bf-tab-background: var(--bf-bg); + --bf-tab-toolbar-bg: var(--bf-bg); --bf-tab-color: var(--bf-color); --bf-tab-selected-bg: #1A1A1A; @@ -166,7 +166,7 @@ Contains navbar, urlbar, and etc. */ .browser-toolbar { - background: var(--bf-tab-background) !important; + background: var(--bf-tab-toolbar-bg) !important; } toolbar { @@ -472,7 +472,6 @@ The tabs container /* Center all content */ .tab-content { - display: flex; justify-content: center; align-items: center; margin-top: -1px; @@ -480,6 +479,19 @@ The tabs container padding: 0 10px !important; } +/* A way to center the label and icon while +the close button is positioned to the far right */ +.tab-content::before{ + content: ""; + display: -moz-box; + -moz-box-flex: 1 +} + +/* Tab close button */ +.tab-close-button { +/* display: none !important; */ +} + /* Prevent tab icons size breaking */ .tab-icon-image, .tab-icon-sound, .tab-throbber, .tab-throbber-fallback, @@ -500,11 +512,6 @@ The tabs container margin-left: 0 !important; } -/* Hide close tab button */ -.tab-close-button { - display: none !important; -} - /* Tab icon */ hbox.tab-content .tab-icon-image { display: initial !important;