Guest User

userChrome.css

a guest
Aug 14th, 2025
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.59 KB | None | 0 0
  1. @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
  2.  
  3. :root {
  4. --tab-max-height: 10px !important;
  5. }
  6.  
  7. .tabbrowser-tab .tab-label {
  8. font-size: 12px !important;
  9. }
  10.  
  11. .tabbrowser-tab .tab-loading-burst {
  12. display: none !important;
  13. }
  14.  
  15. .tabbrowser-tab .tab-close-button {
  16. visibility: collapse !important;
  17. }
  18.  
  19. .titlebar-min, .titlebar-max,
  20. .titlebar-restore, .titlebar-close {
  21. display: none !important;
  22. }
  23.  
  24. .tabbrowser-tab:not([style^="max-width"]):not([pinned]),
  25. .tabbrowser-tab[style^="max-width: 100px !important;"]:not([pinned]) {
  26. max-width: 100% !important;
  27. }
  28.  
  29. .tabbrowser-tab:not([style^="max-width"]):not([pinned]):not([fadein]),
  30. .tabbrowser-tab[style^="max-width: 100px !important;"]:not([pinned]):not([fadein]) {
  31. max-width: .1px !important;
  32. }
  33.  
  34. #TabsToolbar .titlebar-spacer {
  35. display: none !important;
  36. }
  37.  
  38. .tabbrowser-tab[usercontextid]>.tab-stack>.tab-background>.tab-bottom-line {
  39. display: none;
  40. }
  41.  
  42. #tabs-newtab-button {
  43. display: none !important;
  44. }
  45.  
  46. #back-button, #forward-button {
  47. display: none !important;
  48. }
  49.  
  50. .tab-label {
  51. text-align: center !important;
  52. margin-left: auto !important;
  53. margin-right: auto !important;
  54. }
  55.  
  56. .tab-icon-stack {
  57. display: none !important;
  58. }
  59.  
  60. #PanelUI-button {
  61. -moz-box-ordinal-group: 0 !important;
  62. order: -1 !important;
  63. margin-right: 8px !important;
  64. }
  65.  
  66. #tabbrowser-tabs,
  67. #tabbrowser-tabs > #tabbrowser-arrowscrollbox,
  68. .tabbrowser-tabs .tabbrowser-tab {
  69. min-height: var(--tab-min-height) !important;
  70. max-height: var(--tab-min-height) !important;
  71. }
  72.  
  73. #TabsToolbar {
  74. height: var(--tab-min-height) !important;
  75. margin-top: -8px !important;
  76. margin-bottom: -1px !important;
  77. margin-right: -1px !important;
  78. margin-left: -1px !important;
  79. }
  80.  
  81. #TabsToolbar .tabbrowser-tab[selected="true"] .tab-label {
  82. font-weight: 700 !important;
  83. }
  84.  
  85. #TabsToolbar .tab-label {
  86. font-family: "0xProto Nerd Font" !important;
  87. }
  88.  
  89. #toolbar-menubar {
  90. background-color: #11111b !important;
  91. color: #cdd6f4 !important;
  92. }
  93.  
  94. menupopup, popup, panel {
  95. --panel-background: #11111b !important;
  96. --panel-color: #cdd6f4 !important;
  97. }
  98.  
  99. menupopup > menuitem:hover, menupopup > menuitem[selected="true"],
  100. menupopup > menu:hover, menupopup > menu[selected="true"] {
  101. background-color: #313244 !important;
  102. color: #cdd6f4 !important;
  103. }
  104.  
  105. /* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_main_toolbar.css made available under Mozilla Public License v. 2.0
  106. See the above repository for updates as well as full license text. */
  107.  
  108. /* 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. */
  109.  
  110. :root{
  111. --uc-navbar-transform: -40px;
  112. --uc-autohide-toolbar-delay: 1.8s;
  113. --uc-autohide-toolbar-duration: 400ms;
  114. }
  115. :root[uidensity="compact"]{ --uc-navbar-transform: -34px }
  116.  
  117. #navigator-toolbox > div{ display: contents; }
  118. :root[sessionrestored] :where(#nav-bar,#PersonalToolbar,#tab-notification-deck,.global-notificationbox,#notifications-toolbar){
  119. transform: translateY(var(--uc-navbar-transform))
  120. }
  121. :root:is([customizing],[chromehidden*="toolbar"]) :where(#nav-bar,#PersonalToolbar,#tab-notification-deck,.global-notificationbox,#notifications-toolbar){
  122. transform: none !important;
  123. opacity: 1 !important;
  124. }
  125.  
  126. #nav-bar:not([customizing]){
  127. opacity: 0;
  128. transition: transform var(--uc-autohide-toolbar-duration) ease var(--uc-autohide-toolbar-delay), opacity var(--uc-autohide-toolbar-duration) ease var(--uc-autohide-toolbar-delay) !important;
  129. position: relative;
  130. z-index: 2;
  131. }
  132. #titlebar{ position: relative; z-index: 3 }
  133.  
  134. #navigator-toolbox,
  135. #sidebar-box,
  136. #sidebar-main,
  137. #sidebar-splitter,
  138. #tabbrowser-tabbox{
  139. z-index: auto !important;
  140. }
  141. /* Show when toolbox is focused, like when urlbar has received focus */
  142. #navigator-toolbox:focus-within > .browser-toolbar{
  143. transform: translateY(0);
  144. opacity: 1;
  145. transition-duration: var(--uc-autohide-toolbar-duration), var(--uc-autohide-toolbar-duration) !important;
  146. transition-delay: 0s !important;
  147. }
  148. /* Show when toolbox is hovered */
  149. #titlebar:hover ~ .browser-toolbar,
  150. .browser-titlebar:hover ~ :is(#nav-bar,#PersonalToolbar),
  151. #nav-bar:hover,
  152. #nav-bar:hover + #PersonalToolbar{
  153. transform: translateY(0);
  154. opacity: 1;
  155. transition-duration: var(--uc-autohide-toolbar-duration), var(--uc-autohide-toolbar-duration) !important;
  156. transition-delay: 0s !important;
  157. }
  158. :root[sessionrestored] #urlbar[popover]{
  159. opacity: 0;
  160. pointer-events: none;
  161. transition: transform var(--uc-autohide-toolbar-duration) ease var(--uc-autohide-toolbar-delay), opacity var(--uc-autohide-toolbar-duration) ease var(--uc-autohide-toolbar-delay);
  162. transform: translateY(var(--uc-navbar-transform));
  163. }
  164. #mainPopupSet:has(> [panelopen]:not(#ask-chat-shortcuts,#selection-shortcut-action-panel,#chat-shortcuts-options-panel,#tab-preview-panel)) ~ toolbox #urlbar[popover],
  165. .browser-titlebar:is(:hover,:focus-within) ~ #nav-bar #urlbar[popover],
  166. #nav-bar:is(:hover,:focus-within) #urlbar[popover],
  167. #urlbar-container > #urlbar[popover]:is([focused],[open]){
  168. opacity: 1;
  169. pointer-events: auto;
  170. transition-delay: 0ms;
  171. transform: translateY(0);
  172. }
  173. #urlbar-container > #urlbar[popover]:is([focused],[open]){
  174. transition-duration: 100ms; /* Faster when focused */
  175. }
  176. /* This ruleset is separate, because not having :has support breaks other selectors as well */
  177. #mainPopupSet:has(> [panelopen]:not(#ask-chat-shortcuts,#selection-shortcut-action-panel,#chat-shortcuts-options-panel,#tab-preview-panel)) ~ #navigator-toolbox > .browser-toolbar{
  178. transition-delay: 33ms !important;
  179. transform: translateY(0);
  180. opacity: 1;
  181. }
  182. /* If tabs are in sidebar then nav-bar doesn't normally have its own background - so we nee to add it back */
  183. #nav-bar.browser-titlebar{
  184. background: inherit;
  185. }
  186. #toolbar-menubar:not([autohide="true"]) ~ #nav-bar.browser-titlebar{
  187. background-position-y: -28px; /* best guess, could vary */
  188. border-top: none !important;
  189. }
  190.  
  191. /* Bookmarks toolbar needs so extra rules */
  192. #PersonalToolbar{ transition: transform var(--uc-autohide-toolbar-duration) ease var(--uc-autohide-toolbar-delay) !important; position: relative; z-index: 1 }
  193.  
  194. /* Move up the content view */
  195. :root[sessionrestored]:not([chromehidden~="toolbar"]) > body > #browser{
  196. margin-top: var(--uc-navbar-transform);
  197. }
  198. @media -moz-pref("browser.fullscreen.autohide"),
  199. (-moz-bool-pref: "browser.fullscreen.autohide"){
  200. :root[sessionrestored][sizemode="fullscreen"] > body > #browser{
  201. margin-top: revert;
  202. }
  203. }
Advertisement
Add Comment
Please, Sign In to add comment