fenix-fox/chrome/hide_tabs_with_one_tab_w_window_controls.css

76 lines
2.7 KiB
CSS
Raw Normal View History

2020-05-22 05:13:58 +00:00
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/hide_tabs_with_one_tab_w_window_controls.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.
* 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
**/
2018-12-02 03:30:59 +00:00
/* IMPORTANT */
/*
Get window_control_placeholder_support.css
Window controls will be all wrong without it
*/
2018-12-02 03:30:59 +00:00
:root{
--uc-menubar-vertical-overlap: 28px; /* adjust as necessary */
}
2018-12-02 03:07:43 +00:00
#titlebar{ -moz-appearance: none !important; }
/* We'll use window controls from menubar instead */
#TabsToolbar > .titlebar-buttonbox-container { display: none }
/* Hide overflow button unless tabs overflow - is necessary for collpasing tabs with one tab */
#tabbrowser-tabs:not([overflow="true"]) ~ #alltabs-button{ display: none }
2021-09-09 13:19:46 +00:00
#tabbrowser-tabs,
#tabbrowser-arrowscrollbox{ min-height: 0 !important; }
#TabsToolbar > .titlebar-spacer[type="post-tabs"]{
width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-post,0px)) !important;
-moz-box-ordinal-group: 2; /* Fx < 112 compatibility */
order: 2;
}
#toolbar-menubar > spacer{ pointer-events: none }
#tabs-newtab-button{
display: none;
2018-12-02 03:07:43 +00:00
}
/* Need to hide private-browsing indicators, but you can still use privatemode_indicator_as_menu_button.css */
#private-browsing-indicator,
#private-browsing-indicator-with-label{
display: none;
}
.accessibility-indicator,
.private-browsing-indicator{
height: unset !important;
}
.accessibility-indicator > hbox{ padding-block: 0 !important }
.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"]{
2018-12-02 03:07:43 +00:00
visibility: collapse;
min-height: 0 !important;
height: 0;
2018-12-02 03:07:43 +00:00
}
/* Window controls in nav-bar */
:root[tabsintitlebar]:not([customizing]) #toolbar-menubar[inactive]{
2018-12-02 03:07:43 +00:00
height: initial !important;
min-height: initial !important;
margin-bottom: calc(0px - var(--uc-menubar-vertical-overlap,0px)) !important;
2018-12-02 03:07:43 +00:00
}
:root:not([customizing]) #toolbar-menubar[autohide][inactive] > #menubar-items{ pointer-events: none; opacity: 0 }
2021-05-15 09:13:32 +00:00
:root[sizemode="fullscreen"] #TabsToolbar > #window-controls{ z-index: 2; }
.titlebar-buttonbox{ color: inherit }