2020-05-22 05:13:58 +00:00
/ * Source file https : / / github . com / MrOtherGuy / firefox-csshacks / tree / master / chrome / multi-row_tabs_legacy . css made available under Mozilla Public License v . 2 . 0
See the above repository for updates as well as full license text . * /
2018-12-16 02:43:06 +00:00
/* Makes tabs to appear on multiple lines */
2019-01-24 11:35:40 +00:00
/* Tab reordering will not work and can't be made to work */
2019-02-05 11:25:27 +00:00
/* You can use multi-row_tabs_window_control_patch.css to move window controls to nav-bar*/
2018-12-16 02:43:06 +00:00
2019-01-24 11:35:40 +00:00
/* It's recommended to move tabs new-tab-button outside tabs toolbar */
2019-01-28 19:04:23 +00:00
/* Change the --multirow-n-rows to change maximum number of rows before the rows will start to scroll */
2019-01-31 03:33:58 +00:00
/* This maximum visible rows won't work before Fx66 */
/* So this setting does nothing on Fx65 and all tab rows will be shown */
2019-03-21 07:41:35 +00:00
: 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. */
}
2019-01-28 19:04:23 +00:00
2019-10-29 12:07:29 +00:00
/* 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 */
2019-01-24 11:35:40 +00:00
# tabbrowser-tabs {
2018-12-16 02:43:06 +00:00
min-height : unset ! important ;
2019-01-24 11:35:40 +00:00
padding-inline-start : 0px ! important
2018-12-16 02:43:06 +00:00
}
2019-10-11 05:20:35 +00:00
/* Selectors for Firefox 71+ */
/* These are not tabs toolbar specific but horizontal scrollbox isn't used elsewhere, except in bookmarks toolbar but there it doesn't have [part] attribute since it's not in shadow-root */
2019-10-11 11:01:55 +00:00
@ -moz-document url ( chrome : / / browser / content / browser . xhtml ) {
. scrollbutton-up [ orient = "horizontal" ] [ part ] ~ spacer ,
. scrollbutton-up [ orient = "horizontal" ] [ part ] ,
. scrollbutton-down [ orient = "horizontal" ] [ part ] { display : none }
2019-10-11 05:20:35 +00:00
2019-10-11 11:01:55 +00:00
scrollbox [ part ] [ orient = "horizontal" ] {
display : flex ;
flex-wrap : wrap ;
overflow-y : auto ;
max-height : calc ( var ( --tab-min-height ) * var ( --multirow-n-rows ) ) ;
scrollbar-color : currentColor transparent ;
scrollbar-width : thin ;
}
2019-10-11 05:20:35 +00:00
}
2019-01-24 11:35:40 +00:00
/* Test for Firefox > 66 */
@ supports ( inset-block : auto ) {
# tabbrowser-tabs > . tabbrowser-arrowscrollbox > . arrowscrollbox-scrollbox {
display : flex ;
flex-wrap : wrap ;
2019-01-28 19:04:23 +00:00
overflow-y : auto ;
max-height : calc ( var ( --tab-min-height ) * var ( --multirow-n-rows ) ) ;
scrollbar-color : var ( --toolbar-bgcolor ) var ( --lwt-accent-color ) ;
scrollbar-width : thin ;
2019-01-24 11:35:40 +00:00
}
2020-04-07 18:34:41 +00:00
# tabbrowser-tabs > . tabbrowser-arrowscrollbox ,
# tabbrowser-arrowscrollbox {
2019-01-24 11:35:40 +00:00
overflow : -moz-hidden-unscrollable ;
display : block ;
}
2018-12-16 02:43:06 +00:00
}
2019-01-24 11:35:40 +00:00
/* Test for Firefox < 66 */
@ supports not ( inset-block : auto ) {
# tabbrowser-tabs > . tabbrowser-arrowscrollbox {
min-height : unset ! important ;
}
# tabbrowser-tabs . scrollbox-innerbox {
display : flex ;
flex-wrap : wrap ;
}
# tabbrowser-tabs . arrowscrollbox-scrollbox {
overflow : -moz-hidden-unscrollable ;
display : block ;
}
2018-12-16 02:43:06 +00:00
}
2019-01-24 11:35:40 +00:00
2019-01-28 19:04:23 +00:00
. tabbrowser-tab { height : var ( - - tab - min - height ) ; }
# tabbrowser-tabs . tabbrowser-tab [ pinned ] {
2019-01-24 11:35:40 +00:00
position : static ! important ;
margin-inline-start : 0px ! important ;
}
. tabbrowser-tab [ fadein ] : not ( [ pinned ] ) {
2019-03-21 07:30:05 +00:00
min-width : var ( --multirow-tab-min-width ) ! important ;
2019-03-21 07:41:35 +00:00
flex-grow : var ( --multirow-tab-dynamic-width ) ;
2018-12-16 02:43:06 +00:00
/ *
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;*/
}
2019-01-24 11:35:40 +00:00
. tabbrowser-tab > stack { width : 100 % ; height : 100 % }
2020-04-08 12:03:17 +00:00
# scrollbutton-up ,
# scrollbutton-down ,
# scrollbutton-up ~ spacer ,
2019-01-24 11:35:40 +00:00
# tabbrowser-tabs . scrollbutton-up ,
# tabbrowser-tabs . scrollbutton-down ,
# alltabs-button ,
: root : not ( [ customizing ] ) # TabsToolbar # new-tab-button ,
2019-01-28 19:04:23 +00:00
# tabbrowser-tabs spacer ,
2019-10-29 12:07:29 +00:00
. tabbrowser-tab :: after { display : none !important }