From 5e3164aa3529913a66408b302e34e3815515abfa Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Sun, 22 Oct 2023 12:18:59 +0300 Subject: [PATCH] selected_tab_as_urlbar: fix various issues and add support for menubar --- chrome/selected_tab_as_urlbar.css | 39 ++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/chrome/selected_tab_as_urlbar.css b/chrome/selected_tab_as_urlbar.css index f78f235..daecd03 100644 --- a/chrome/selected_tab_as_urlbar.css +++ b/chrome/selected_tab_as_urlbar.css @@ -57,22 +57,43 @@ See the above repository for updates as well as full license text. */ /* Oh and! also hide other buttons from the nav-bar because why not */ :root:not([customizing]) #nav-bar-customization-target > :not(#urlbar-container){ visibility: collapse } -#TabsToolbar > .toolbar-items{ margin-right: 80px !important; } +#TabsToolbar > .toolbar-items{ + margin-right: 40px !important; + margin-left: 80px !important; +} +#unified-extensions-button{ + visibility: visible !important; +} +#back-button, #forward-button{ + order: -1; + z-index: 2; + visibility: visible !important; +} /* By default this style moves your back and forward buttons to the left edge of the navbar and adds a placeholder space for them. Set the following pref to false to disable that behavior */ -@supports not -moz-bool-pref("userchrome.selected-tab-as-urlbar.nav-buttons-space.disabled"){ - #TabsToolbar > .toolbar-items{ margin-left: 80px } - :root[sizemode="normal"] #nav-bar-customization-target{ margin-left: 40px } +@media (-moz-bool-pref: "userchrome.selected-tab-as-urlbar.nav-buttons-space.disabled"){ + #TabsToolbar > .toolbar-items{ margin-left: 0px } + #nav-bar-customization-target{ margin-left: 0px } + #back-button, #forward-button{ + order: auto; + z-index: auto; + } +} + +@supports -moz-bool-pref("userchrome.selected-tab-as-urlbar.nav-buttons-space.disabled"){ + #TabsToolbar > .toolbar-items{ margin-left: 0px } + #nav-bar-customization-target{ margin-left: 0px } #back-button, #forward-button{ - order: -1; - visibility: visible !important; - z-index: 2; + order: auto; + z-index: auto; } } #nav-bar{ height: calc(var(--tab-min-height) + 2*var(--tab-block-margin)); - padding-right: 138px; box-shadow: none !important; background-color: transparent !important; -} \ No newline at end of file +} +#titlebar:has(> [autohide="true"]) + #nav-bar{ + padding-right: 138px; +} \ No newline at end of file