2021-05-31 20:52:10 +00:00
/ * Source file https : / / github . com / MrOtherGuy / firefox-csshacks / tree / master / chrome / autohide_main_toolbar . css made available under Mozilla Public License v . 2 . 0
See the above repository for updates as well as full license text . * /
2021-06-01 06:52:34 +00:00
/* This style hides the main toolbar and shows it when the cursor is over the tabs toolbar as well as whenever the focus is inside nav-bar, such as when urlbar is focused. */
2021-05-31 20:52:10 +00:00
: root { --uc-navbar-transform : -40 px }
: root [ uidensity = "compact" ] { --uc-navbar-transform : -34 px }
2022-03-27 12:31:59 +00:00
# navigator-toolbox > div { display : contents ; }
: root [ sessionrestored ] : where ( # nav-bar , # PersonalToolbar , # tab-notification-deck , . global-notificationbox ) {
2021-05-31 20:52:10 +00:00
transform : translateY ( var ( --uc-navbar-transform ) )
}
2022-03-27 12:31:59 +00:00
: root : is ( [ customizing ] , [ chromehidden * = "toolbar" ] ) : where ( # nav-bar , # PersonalToolbar , # tab-notification-deck , . global-notificationbox ) {
2021-07-02 09:34:43 +00:00
transform : none ! important ;
opacity : 1 ! important ;
2021-06-01 06:52:34 +00:00
}
# nav-bar : not ( [ customizing ] ) {
2021-05-31 20:52:10 +00:00
opacity : 0 ;
2021-06-01 06:52:34 +00:00
transition : transform 400ms ease 1 . 8s , opacity 400ms ease 1 . 8s ! important ;
2021-05-31 20:52:10 +00:00
position : relative ;
2021-06-01 06:13:36 +00:00
z-index : 2 ;
2021-05-31 20:52:10 +00:00
}
2021-06-03 07:30:38 +00:00
# TabsToolbar { position : relative ; z-index : 3 }
2021-07-16 09:28:39 +00:00
/* Show when toolbox is focused, like when urlbar has received focus */
# navigator-toolbox : focus-within > . browser-toolbar {
transform : translateY ( 0 ) ;
opacity : 1 ;
transition-duration : 500ms , 200ms ! important ;
transition-delay : 0s ! important ;
}
/* Show when toolbox is hovered */
2021-06-01 06:13:36 +00:00
# titlebar : hover ~ . browser-toolbar ,
# nav-bar : hover ,
# nav-bar : hover + # PersonalToolbar {
2021-05-31 20:52:10 +00:00
transform : translateY ( 0 ) ;
opacity : 1 ;
2021-06-01 06:52:34 +00:00
transition-duration : 500ms , 200ms ! important ;
2021-05-31 20:52:10 +00:00
transition-delay : 0s ! important ;
}
2021-06-01 06:52:34 +00:00
2021-07-16 09:28:39 +00:00
/* Bookmarks toolbar needs so extra rules */
2021-05-31 20:52:10 +00:00
# PersonalToolbar { transition : transform 400 ms ease 1.8 s !important ; position : relative ; z-index : 1 }
2021-07-16 09:28:39 +00:00
/* Move up the content view */
: root [ sessionrestored ] : not ( [ inFullscreen ] ) > body > # browser { margin-top : var ( - - uc - navbar - transform ) ; }