From e0827fdec1fe64f69931cda8afe35136775c2f4f Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sun, 21 Aug 2022 01:03:14 +0900 Subject: [PATCH] Fix: Tab Bar - As titlebar pre space --- css/leptonChrome.css | 30 +++++++++++++------ src/tabbar/_as_titlebar.scss | 58 ++++++++++++++---------------------- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/css/leptonChrome.css b/css/leptonChrome.css index 0805811..154f0a2 100644 --- a/css/leptonChrome.css +++ b/css/leptonChrome.css @@ -5279,6 +5279,27 @@ width: unset !important; } + /* Padding */ + @supports not -moz-bool-pref("userChrome.centered.tab") { + #tabbrowser-arrowscrollbox { + margin-inline: 2px !important; + } + + :root[sizemode="normal"] #tabbrowser-arrowscrollbox { + margin-inline: 6px !important; + } + } + @supports -moz-bool-pref("userChrome.centered.tab") { + @supports -moz-bool-pref("userChrome.centered.tab.label") { + #tabbrowser-arrowscrollbox { + margin-inline: 2px !important; + } + + :root[sizemode="normal"] #tabbrowser-arrowscrollbox { + margin-inline: 6px !important; + } + } + } @supports -moz-bool-pref("browser.tabs.tabmanager.enabled") { :root:not([tabsintitlebar="true"]) #tabbrowser-tabs:not([overflow="true"], [hashiddentabs]) ~ #alltabs-button, :root:not([tabsintitlebar="true"]) @@ -5287,15 +5308,6 @@ display: -moz-box !important; } } - #tabbrowser-tabs:not([positionpinnedtabs]) > #tabbrowser-arrowscrollbox { - padding-inline: 12.5px !important; - } - - #tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs]) - > #tabbrowser-arrowscrollbox - > .tabbrowser-tab[first-visible-unpinned-tab] { - --inline-tab-padding: 0 !important; - } } /** Tab UI ****************************************************************/ /*= Tab - Connect to window ==============================================*/ diff --git a/src/tabbar/_as_titlebar.scss b/src/tabbar/_as_titlebar.scss index 77f5175..433e6ec 100644 --- a/src/tabbar/_as_titlebar.scss +++ b/src/tabbar/_as_titlebar.scss @@ -1,3 +1,17 @@ +//-- Mixin --------------------------------------------------------------------- +@mixin _asTitlebar_preSpacer() { + @include NotOption("userChrome.centered.tab") { + @content; + } + @include Option("userChrome.centered.tab") { + @include Option("userChrome.centered.tab.label") { + @content; + } + } +} + +//------------------------------------------------------------------------------ + :root:not([tabsintitlebar="true"]) #tabbrowser-tabs, /* Show only */ #scrollbutton-up, /* Defaults */ #scrollbutton-down, @@ -33,7 +47,6 @@ spacer:is([part="overflow-start-indicator"], [part="overflow-end-indicator"]), width: 100%; } - /* Pinned */ #tabbrowser-tabs[positionpinnedtabs] > #tabbrowser-arrowscrollbox > .tabbrowser-tab[pinned][selected="true"] { position: relative !important; @@ -55,44 +68,19 @@ spacer:is([part="overflow-start-indicator"], [part="overflow-end-indicator"]), width: unset !important; } +/* Padding */ +@include _asTitlebar_preSpacer { + #tabbrowser-arrowscrollbox { + margin-inline: 2px !important; + } + :root[sizemode="normal"] #tabbrowser-arrowscrollbox { + margin-inline: 6px !important; + } + -// @supports not -moz-bool-pref("browser.tabs.tabmanager.enabled") { -// #tabbrowser-tabs:not([overflow="true"], [hashiddentabs]) ~ #alltabs-button { -// display: none; -// } -// #tabbrowser-tabs:not([overflow="true"])[using-closing-tabs-spacer] ~ #alltabs-button { -// // temporary space to keep a tab's close button under the cursor -// display: -moz-box; -// visibility: hidden; -// } -// } -// -// #tabbrowser-tabs[hasadjacentnewtabbutton]:not([overflow="true"]) ~ #new-tab-button, -// #tabbrowser-tabs[overflow="true"] > #tabbrowser-arrowscrollbox > #tabbrowser-arrowscrollbox-periphery > #tabs-newtab-button, -// #tabbrowser-tabs:not([hasadjacentnewtabbutton]) > #tabbrowser-arrowscrollbox > #tabbrowser-arrowscrollbox-periphery > #tabs-newtab-button, -// #TabsToolbar[customizing="true"] #tabs-newtab-button { -// display: none; -// } -// -// #tabbrowser-tabs[positionpinnedtabs] > #tabbrowser-arrowscrollbox::part(scrollbox) { -// // Add padding to match the shadow's blur radius so the -// // shadow doesn't get clipped when either the first or -// // last tab is selected -// padding-inline: var(--tab-shadow-max-size); // 6px -// } -// -// #tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs]) > #tabbrowser-arrowscrollbox > .tabbrowser-tab[first-visible-unpinned-tab] { -// margin-inline-start: 12px !important; -// } @include Option("browser.tabs.tabmanager.enabled") { :root:not([tabsintitlebar="true"]) #tabbrowser-tabs:not([overflow="true"], [hashiddentabs]) ~ #alltabs-button, :root:not([tabsintitlebar="true"]) #tabbrowser-tabs[hasadjacentnewtabbutton]:not([overflow="true"]) ~ #new-tab-button { display: -moz-box !important; } } -#tabbrowser-tabs:not([positionpinnedtabs]) > #tabbrowser-arrowscrollbox { - padding-inline: 12.5px !important; -} -#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs]) > #tabbrowser-arrowscrollbox > .tabbrowser-tab[first-visible-unpinned-tab] { - --inline-tab-padding: 0 !important; -}