multi row tabs: Make optional features use -moz-bool-pref media query

This commit is contained in:
MrOtherGuy
2023-11-18 10:08:48 +02:00
parent 97d32f14ac
commit d66b6e54be
2 changed files with 27 additions and 37 deletions

View File

@@ -1,27 +1,21 @@
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/multi-row_tabs.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* Makes tabs to appear on multiple lines */
/* Tab reordering will not work and can't be made to work */
/* You can use multi-row_tabs_window_control_patch.css to move window controls to nav-bar*/
/* Makes tabs to appear on multiple lines
* Tab reordering will not work and can't be made to work
* You can use multi-row_tabs_window_control_patch.css to move window controls to nav-bar
* You might want to move tabs-new-tab-button outside tabs toolbar for smoother behavior */
/* You might want to move tabs-new-tab-button outside tabs toolbar for smoother behavior */
/* Change the --multirow-n-rows to change maximum number of rows before the rows will start to scroll */
/* SETTINGS (you need to create and set these prefs to true in about:config)
* userchrome.multirowtabs.full-width-tabs.enabled - make tabs grow horizontally to fill all available space
* userchrome.multirowtabs.scrollbar-handle.enabled - make scrollbar in tabs box respond to mouse, makes it imposiible to drag window from empty space in tabs box */
:root{
--multirow-n-rows: 3;
--multirow-tab-min-width: 100px;
--multirow-tab-dynamic-width: 1; /* Change to 0 for fixed-width tabs using the above width. */
--multirow-n-rows: 3; /* change maximum number of rows before the rows will start to scroll */
--multirow-tab-min-width: 100px;
--multirow-tab-dynamic-width: 1; /* Change to 0 for fixed-width tabs using the above width. */
}
/* Scrollbar can't be clicked but the rows can be scrolled with mouse wheel */
/* Uncomment the next line if you want to be able to use the scrollbar with mouse clicks */
/* #tabbrowser-arrowscrollbox{ -moz-window-dragging: no-drag } */
/* Uncommenting the above makes you unable to drag the window from empty space in the tab strip but normal draggable spaces will continue to work */
#tabbrowser-tabs{
min-height: unset !important;
padding-inline-start: 0px !important
@@ -61,11 +55,6 @@ See the above repository for updates as well as full license text. */
.tabbrowser-tab[fadein]:not([pinned]){
min-width: var(--multirow-tab-min-width) !important;
flex-grow: var(--multirow-tab-dynamic-width) !important;
/*
Uncomment to enable full-width tabs, also makes tab dragging a tiny bit more sensible
Don't set to none or you'll see errors in console when closing tabs
*/
/*max-width: 100vw !important;*/
}
.tabbrowser-tab > stack{ width: 100%; height: 100% }
@@ -81,3 +70,10 @@ See the above repository for updates as well as full license text. */
:root:not([customizing]) #TabsToolbar #new-tab-button,
#tabbrowser-arrowscrollbox > spacer,
.tabbrowser-tab::after{ display: none !important }
@media (-moz-bool-pref: "userchrome.multirowtabs.full-width-tabs.enabled"){
.tabbrowser-tab[fadein]:not([pinned]){ max-width: 100vw !important; }
}
@media (-moz-bool-pref: "userchrome.multirowtabs.scrollbar-handle.enabled"){
#tabbrowser-arrowscrollbox{ -moz-window-dragging: no-drag }
}