Advertisement
Rrrrrrrr123

Untitled

Mar 26th, 2023 (edited)
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.22 KB | None | 0 0
  1. /* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_main_toolbar.css made available under Mozilla Public License v. 2.0
  2. See the above repository for updates as well as full license text. */
  3.  
  4. /* 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. */
  5.  
  6. :root{ --uc-navbar-transform: -40px }
  7. :root[uidensity="compact"]{ --uc-navbar-transform: -34px }
  8.  
  9. #navigator-toolbox > div{ display: contents; }
  10. :root[sessionrestored] :where(#nav-bar,#PersonalToolbar,#tab-notification-deck,.global-notificationbox){
  11. transform: translateY(var(--uc-navbar-transform))
  12. }
  13. :root:is([customizing],[chromehidden*="toolbar"]) :where(#nav-bar,#PersonalToolbar,#tab-notification-deck,.global-notificationbox){
  14. transform: none !important;
  15. opacity: 1 !important;
  16. }
  17.  
  18. #nav-bar:not([customizing]){
  19. opacity: 0;
  20. transition: transform 200ms ease 0.7s, opacity 200ms ease 0.7s !important;
  21. position: relative;
  22. z-index: 2;
  23. }
  24. #TabsToolbar{ position: relative; z-index: 3 }
  25.  
  26. /* Show when toolbox is focused, like when urlbar has received focus */
  27. #navigator-toolbox:focus-within > .browser-toolbar{
  28. transform: translateY(0);
  29. opacity: 1;
  30. transition-duration: 200ms !important;
  31. transition-delay: 0s !important;
  32. }
  33. /* Show when toolbox is hovered */
  34. #titlebar:hover ~ .browser-toolbar,
  35. #nav-bar:hover,
  36. #nav-bar:hover + #PersonalToolbar{
  37. transform: translateY(0);
  38. opacity: 1;
  39. transition-duration: 200ms, 200ms !important;
  40. transition-delay: 0s !important;
  41. }
  42.  
  43. /* Bookmarks toolbar needs so extra rules */
  44. #PersonalToolbar{ transition: transform 200ms ease 0.7s !important; position: relative; z-index: 1 }
  45.  
  46. /* Move up the content view */
  47. :root[sessionrestored]:not([inFullscreen]) > body > #browser{ margin-top: var(--uc-navbar-transform); }
  48.  
  49. /*
  50. * Hide Tabs on Topbar
  51. */
  52. #TabsToolbar {
  53. visibility: collapse;
  54. }
  55.  
  56. /* Hide main tabs toolbar */
  57. #main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items {
  58. opacity: 0;
  59. pointer-events: none;
  60. }
  61. #main-window:not([tabsintitlebar="true"]) #TabsToolbar {
  62. visibility: collapse !important;
  63. }
  64.  
  65. /* Sidebar min and max width removal */
  66. #sidebar {
  67. max-width: none !important;
  68. min-width: 0px !important;
  69. }
  70. /* Hide splitter, when using Tree Style Tab. */
  71. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] + #sidebar-splitter {
  72. display: none !important;
  73. }
  74. /* Hide sidebar header, when using Tree Style Tab. */
  75. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
  76. visibility: collapse;
  77. }
  78.  
  79. /* Shrink sidebar until hovered, when using Tree Style Tab. */
  80. :root {
  81. --thin-tab-width: 30px;
  82. --wide-tab-width: 200px;
  83. }
  84. #sidebar-box:not([sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]) {
  85. min-width: var(--wide-tab-width) !important;
  86. max-width: none !important;
  87. }
  88. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] {
  89. position: relative !important;
  90. transition: all 100ms !important;
  91. min-width: var(--thin-tab-width) !important;
  92. max-width: var(--thin-tab-width) !important;
  93. }
  94. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]:hover {
  95. transition: all 100ms !important;
  96. min-width: var(--wide-tab-width) !important;
  97. max-width: var(--wide-tab-width) !important;
  98. margin-right: calc((var(--wide-tab-width) - var(--thin-tab-width)) * -1) !important;
  99. z-index: 1;
  100. }
  101.  
  102. /*
  103. * Hide Tabs on Topbar
  104. */
  105. #TabsToolbar {
  106. visibility: collapse;
  107. }
  108.  
  109. /* Hide main tabs toolbar */
  110. #main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items {
  111. opacity: 0;
  112. pointer-events: none;
  113. }
  114. #main-window:not([tabsintitlebar="true"]) #TabsToolbar {
  115. visibility: collapse !important;
  116. }
  117.  
  118. /* Sidebar min and max width removal */
  119. #sidebar {
  120. max-width: none !important;
  121. min-width: 0px !important;
  122. }
  123. /* Hide splitter, when using Tree Style Tab. */
  124. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] + #sidebar-splitter {
  125. display: none !important;
  126. }
  127. /* Hide sidebar header, when using Tree Style Tab. */
  128. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
  129. visibility: collapse;
  130. }
  131.  
  132. /* Shrink sidebar until hovered, when using Tree Style Tab. */
  133. :root {
  134. --thin-tab-width: 30px;
  135. --wide-tab-width: 200px;
  136. }
  137. #sidebar-box:not([sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]) {
  138. min-width: var(--wide-tab-width) !important;
  139. max-width: none !important;
  140. }
  141. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] {
  142. position: relative !important;
  143. transition: all 100ms !important;
  144. min-width: var(--thin-tab-width) !important;
  145. max-width: var(--thin-tab-width) !important;
  146. }
  147. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]:hover {
  148. transition: all 100ms !important;
  149. min-width: var(--wide-tab-width) !important;
  150. max-width: var(--wide-tab-width) !important;
  151. margin-right: calc((var(--wide-tab-width) - var(--thin-tab-width)) * -1) !important;
  152. z-index: 1;
  153. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement