From 9429288d74f9a154f1bef91204b1ac786efd8173 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 3 Oct 2023 12:58:01 +0900 Subject: [PATCH] Fix: Centered - Start margin at tab content #761 --- css/leptonChrome.css | 22 ++++++++++++++++------ css/leptonChromeESR.css | 22 ++++++++++++++++------ src/centered/tab/_content.scss | 13 +++++++++++-- src/centered/tab/_layout.scss | 8 +++++--- 4 files changed, 48 insertions(+), 17 deletions(-) diff --git a/css/leptonChrome.css b/css/leptonChrome.css index d2f51a0e..55f8c827 100644 --- a/css/leptonChrome.css +++ b/css/leptonChrome.css @@ -9484,9 +9484,11 @@ /** Centered ******************************************************************/ /*= Centered - Tab ===========================================================*/ @supports -moz-bool-pref("userChrome.centered.tab") { - .tabbrowser-tab[selected]:not(:hover) .tab-label-container:not([textoverflow]), - .tabbrowser-tab:not(:hover, [pinned]) .tab-label-container:not([textoverflow]) { - margin-inline-end: 5px; + @supports -moz-bool-pref("userChrome.centered.tab.label") { + .tabbrowser-tab[selected]:not(:hover) .tab-label-container:not([textoverflow]), + .tabbrowser-tab:not(:hover, [pinned]) .tab-label-container:not([textoverflow]) { + margin-inline-end: 5px; + } } @supports -moz-bool-pref("userChrome.tab.close_button_at_hover") { #tabbrowser-tabs[closebuttons="activetab"] @@ -9503,9 +9505,17 @@ } @supports not -moz-bool-pref("userChrome.centered.tab.label") { .tab-icon-stack { - flex: 1; - -moz-box-flex: 1; - justify-content: end; + margin-inline-start: auto; + } + .tab-label-container { + max-width: min-content; + margin-inline-end: auto; + } + @supports -moz-bool-pref("userChrome.tab.close_button_at_hover") { + .tabbrowser-tab:not(:hover, [pinned]) > .tab-stack > .tab-content > .tab-close-button { + padding-inline-start: 6px !important; /* Original: 0px */ + width: 24px !important; /* Original: 17px */ + } } } @supports -moz-bool-pref("userChrome.centered.tab.label") { diff --git a/css/leptonChromeESR.css b/css/leptonChromeESR.css index 814ba7da..2a177d4f 100644 --- a/css/leptonChromeESR.css +++ b/css/leptonChromeESR.css @@ -9893,9 +9893,11 @@ /** Centered ******************************************************************/ /*= Centered - Tab ===========================================================*/ @supports -moz-bool-pref("userChrome.centered.tab") { - .tabbrowser-tab[selected]:not(:hover) .tab-label-container:not([textoverflow]), - .tabbrowser-tab:not(:hover, [pinned]) .tab-label-container:not([textoverflow]) { - margin-inline-end: 5px; + @supports -moz-bool-pref("userChrome.centered.tab.label") { + .tabbrowser-tab[selected]:not(:hover) .tab-label-container:not([textoverflow]), + .tabbrowser-tab:not(:hover, [pinned]) .tab-label-container:not([textoverflow]) { + margin-inline-end: 5px; + } } @supports -moz-bool-pref("userChrome.tab.close_button_at_hover") { #tabbrowser-tabs[closebuttons="activetab"] @@ -9912,9 +9914,17 @@ } @supports not -moz-bool-pref("userChrome.centered.tab.label") { .tab-icon-stack { - flex: 1; - -moz-box-flex: 1; - justify-content: end; + margin-inline-start: auto; + } + .tab-label-container { + max-width: min-content; + margin-inline-end: auto; + } + @supports -moz-bool-pref("userChrome.tab.close_button_at_hover") { + .tabbrowser-tab:not(:hover, [pinned]) > .tab-stack > .tab-content > .tab-close-button { + padding-inline-start: 6px !important; /* Original: 0px */ + width: 24px !important; /* Original: 17px */ + } } } @supports -moz-bool-pref("userChrome.centered.tab.label") { diff --git a/src/centered/tab/_content.scss b/src/centered/tab/_content.scss index 58754979..027873db 100644 --- a/src/centered/tab/_content.scss +++ b/src/centered/tab/_content.scss @@ -1,4 +1,13 @@ .tab-icon-stack { - @include BoxFlex(1); - justify-content: end; + margin-inline-start: auto; +} +.tab-label-container { + max-width: min-content; + margin-inline-end: auto; +} +@include Option("userChrome.tab.close_button_at_hover") { + .tabbrowser-tab:not(:hover, [pinned]) > .tab-stack > .tab-content > .tab-close-button { + padding-inline-start: 6px !important; /* Original: 0px */ + width: 24px !important; /* Original: 17px */ + } } diff --git a/src/centered/tab/_layout.scss b/src/centered/tab/_layout.scss index a26f2207..4e75e656 100644 --- a/src/centered/tab/_layout.scss +++ b/src/centered/tab/_layout.scss @@ -1,6 +1,8 @@ -.tabbrowser-tab[selected]:not(:hover) .tab-label-container:not([textoverflow]), -.tabbrowser-tab:not(:hover,[pinned]) .tab-label-container:not([textoverflow]) { - margin-inline-end: 5px; +@include Option("userChrome.centered.tab.label") { + .tabbrowser-tab[selected]:not(:hover) .tab-label-container:not([textoverflow]), + .tabbrowser-tab:not(:hover,[pinned]) .tab-label-container:not([textoverflow]) { + margin-inline-end: 5px; + } } @include Option("userChrome.tab.close_button_at_hover") {