From 8c41908dd89cc2f1d9f5b43228b3a64b81e896f1 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Sun, 29 Jan 2023 20:49:11 +0200 Subject: [PATCH] Replace uses of [{first,last}-visible-tab] with pseudo-classes Those attributes don't exist anymore in Firefox 109 --- chrome/hide_tabs_with_one_tab.css | 6 +++++- chrome/hide_tabs_with_one_tab_w_window_controls.css | 4 ++++ chrome/multi-row_oneliner_combo_patch.css | 7 ++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/chrome/hide_tabs_with_one_tab.css b/chrome/hide_tabs_with_one_tab.css index 46fc183..eb17119 100644 --- a/chrome/hide_tabs_with_one_tab.css +++ b/chrome/hide_tabs_with_one_tab.css @@ -1,7 +1,10 @@ /* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/hide_tabs_with_one_tab.css made available under Mozilla Public License v. 2.0 See the above repository for updates as well as full license text. */ -/* Makes tabs toolbar items zero-height initially and sets enlarge them to fill up space equal to tab-min-height set on tabs. Optionally use privatemode_indicator_as_menu_button.css to replace main menu icon with private browsing indicator while tabs are hidden. */ +/* Makes tabs toolbar items zero-height initially and sets enlarge them to fill up space equal to tab-min-height set on tabs. Optionally use privatemode_indicator_as_menu_button.css to replace main menu icon with private browsing indicator while tabs are hidden. + +This will NOT work correctly if you have hidden tabs such as with tab groups extensions +*/ /* This style causes CSD window controls to disappear on linux, but you can kind of work around that by using window_control_fallback_for_custom_windows_theme.css */ @@ -23,6 +26,7 @@ See the above repository for updates as well as full license text. */ height: calc(var(--tab-min-height) + 2 * var(--tab-block-margin,0px)); } +.tabbrowser-tab:only-of-type, .tabbrowser-tab[first-visible-tab="true"][last-visible-tab="true"]{ visibility: collapse !important; min-height: 0 !important; diff --git a/chrome/hide_tabs_with_one_tab_w_window_controls.css b/chrome/hide_tabs_with_one_tab_w_window_controls.css index 750787e..f8b4b5a 100644 --- a/chrome/hide_tabs_with_one_tab_w_window_controls.css +++ b/chrome/hide_tabs_with_one_tab_w_window_controls.css @@ -7,6 +7,8 @@ See the above repository for updates as well as full license text. */ * icon with private browsing indicator while tabs are hidden. * REMOVE ALL BUTTONS from tabs toolbar and menubar including newtab-button * and firefox-view-button - this style does not work otherwise. + * + * This will NOT work correctly if you have hidden tabs such as with tab groups extensions **/ /* IMPORTANT */ @@ -51,6 +53,8 @@ Window controls will be all wrong without it .tabbrowser-tab{ height: calc(var(--tab-min-height) + 2 * var(--tab-block-margin)); } + +.tabbrowser-tab:only-of-type, .tabbrowser-tab[first-visible-tab="true"][last-visible-tab="true"]{ visibility: collapse; min-height: 0 !important; diff --git a/chrome/multi-row_oneliner_combo_patch.css b/chrome/multi-row_oneliner_combo_patch.css index bd3778a..3aea53f 100644 --- a/chrome/multi-row_oneliner_combo_patch.css +++ b/chrome/multi-row_oneliner_combo_patch.css @@ -9,6 +9,8 @@ Set the pref layout.css.osx-font-smoothing.enabled to true - this is enabled by This patch only supports window controls on left - ie. they will be drawn to the left of the nav-bar. If you want to use this with window controls on right you must enable native titlebar. There is no good way to handle scrollable multiple rows so you should set the maximum rows in multi-row_tabs.css to something you won't ever hit. Or you could just check what happens. + +This will NOT work correctly if you have hidden tabs such as with tab groups extensions */ /* @@ -39,7 +41,10 @@ chrome/urlbar_full_width.css margin-top: calc(0px - var(--uc-toolbar-height,0px)); margin-left: 0px; } - #tabbrowser-tabs .tabbrowser-tab[first-visible-tab]{ margin-left: var(--uc-navigationbar-width) !important; } + #tabbrowser-tabs .tabbrowser-tab:first-child, + #tabbrowser-tabs .tabbrowser-tab[first-visible-tab]{ + margin-left: var(--uc-navigationbar-width) !important; + } }