Replace uses of [{first,last}-visible-tab] with pseudo-classes

Those attributes don't exist anymore in Firefox 109
This commit is contained in:
MrOtherGuy 2023-01-29 20:49:11 +02:00
parent eeba98f261
commit 8c41908dd8
3 changed files with 15 additions and 2 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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;
}
}