Guy001

userChrome.css for a more compact LibreWolf UI

May 6th, 2026 (edited)
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 6.61 KB | None | 0 0
  1. /* Note that I don't use LibreWolf as often so this might not be up-to-date and have issues */
  2.  
  3.  
  4. /* Note that I have the top Menu Bar visible so if you don't it will cut off the top of the tab bar */
  5. /* To enable the use of the file, enter [about:config](https://support.mozilla.org/en-US/kb/about-config-editor-firefox) in the address bar, then accept the warning if it appears. Search for "toolkit.legacyUserProfileCustomizations.stylesheets" and double-click it to set it to "true" */
  6. /* See a different version for Firefox: https://pastebin.com/CEGA9Bqw */
  7.  
  8.  
  9. /* 01. Menu Bar height */
  10. #toolbar-menubar { /* also works with #menubar-items but requires more padding reduction */
  11.   margin-top: -2px !important;
  12.   margin-bottom: -2px !important;
  13.   padding-top: -2px !important;
  14.   padding-bottom: -2px !important;
  15. }
  16.  
  17. /* 01.2 Aligning "Manage Boorkmarks" to the left, causing the Bookmarks menu to be narrower */
  18. #bookmarksShowAll {
  19.   padding-left: 0px !important;
  20.   margin-left: -10px !important;
  21. }
  22.  
  23. /* 02. Tabs/Tab Bar height */
  24. :root {
  25.   --tab-min-height: 18px !important;
  26. }
  27. #TabsToolbar, #tabbrowser-tabs {
  28.   max-height: 20px !important;
  29. }
  30.  
  31. /* 02.1 decreasing the bottom padding of the tab bar */
  32. #TabsToolbar {
  33.   margin-bottom: -3px !important;
  34. }
  35.  
  36. /* 02.2 padding of the New Tab button */
  37. #tabs-newtab-button {
  38.   padding-left: 3px !important;
  39. }
  40.  
  41. /* 02.3 decreasing the spacing between the site icon and the tab's title */
  42. .tab-icon-stack {
  43.   margin-right: -4px !important;
  44. }
  45.  
  46. /* 02.4 reducing horizontal padding of tab content */
  47. .tab-content {
  48.   padding-right: 2px !important;
  49.   padding-left: 3px !important;
  50. }
  51.  
  52. /* 02.5 reducing spacing between tabs */
  53. tab.tabbrowser-tab {
  54.   padding-right: 1px !important;
  55.   padding-left: 1px !important;
  56. }
  57.  
  58. /* 02.6 minimally rounded tabs (use 0px or 0% to remove rounded corners entirely) */
  59. /* thanks to a somewhat similar solution here https://www.reddit.com/r/FirefoxCSS/comments/1n8xv4s/ */
  60. .tab-background {
  61.   border-radius: 4px !important;
  62. }
  63.  
  64. /* 02.7 padding of the audio button on a tab (mute/unmute), spacing between the icon and the tab's title */
  65. .tab-audio-button  {
  66.   margin-right: -3px !important;
  67.   --button-size-icon-small: 20px !important;
  68.   --button-min-height-small: 20px !important;
  69. }
  70.  
  71. /* 03. Address bar/URL bar/Toolbar */
  72. /* To prevent the address bar from "popping out" while clicking on it set "browser.urlbar.openViewOnFocus" to false in about:config */
  73.  
  74. /* 03.1 reducing empty horizontal space */
  75. /* in the toolbar sides */
  76. #back-button {
  77.   padding-left: 0px !important;
  78. }
  79. #PanelUI-menu-button {
  80.   padding-right: 0px !important;
  81. }
  82.  
  83. /* 03.2 reducing the height of the toolbar/urlbar */
  84. /* note: unfortunately it doesn't affect the hover background of the toolbar buttons, not sure how to fix */
  85. toolbar#nav-bar {
  86.   height: 22px !important;
  87. }
  88. :root {
  89.   --urlbar-min-height: 20px !important;
  90. }
  91. .urlbar {
  92.   --urlbar-height: 20px !important;
  93. }
  94. .urlbar-container {
  95.   --urlbar-container-height: 22px !important;
  96. }
  97. .urlbar-input-container {
  98.   max-height: 20px !important;
  99. }
  100. /* fixing vertical placement of the address text line */
  101. .urlbar-input {
  102.   margin-top: -2px !important;
  103. }
  104.  
  105. /* 03.3 reducing spacing/padding of toolbar buttons (navigation/addons/window controls) */
  106. toolbarbutton {
  107.   margin: -1px !important;
  108. }
  109. /* all icons/buttons in the toolbar around the urlbar, including pinned addons icons */
  110. :root {
  111.   --toolbarbutton-outer-padding: 0px !important;
  112.   --toolbarbutton-inner-padding: 5px !important;
  113.   --toolbarbutton-outer-margin: 0px !important;
  114.   --toolbarbutton-inner-margin: 0px !important;
  115. }
  116. /* spacing between toolbar buttons */
  117. .toolbarbutton-1 {
  118.   margin: -5px !important;
  119.   padding: 0px !important;
  120. }
  121.  
  122. /* 03.3.1 padding of the Permissions/Extension/Firefox button next to the address */
  123. #identity-icon-box {
  124.   padding-right: 1px !important;
  125.   padding-left: 1px !important;
  126.   margin-block: -1px !important;
  127. }
  128.  
  129. /* 03.3.2 lowering the badges (tickers) on pinned addon icons + update dot on hamburger menu */
  130. .toolbarbutton-1 .toolbarbutton-badge {
  131.   margin-top: -3px !important;
  132. }
  133.  
  134. /* 03.4 reducing the horizontal padding of the application menu button ("hamburger menu", 3-line button on the right side of the toolbar) */
  135. #PanelUI-menu-button > stack {
  136.   padding-left: 3px !important;
  137.   padding-right: 3px !important;
  138. }
  139.  
  140. /* 03.5 reverting to a less rounded button background while hovering over it */
  141. :root {
  142.   --button-border-radius: 4px !important;
  143. }
  144.  
  145. /* 04. Menus/Menu Items height/padding */
  146. /* this does not affect the application menu ("hamburger menu") and extensions menu - for these see section 04.3 */
  147. menupopup > menu:not(bookmarksPopup), /* this is for the lines of the sub-menus/folders/containers */
  148. menupopup > menuitem:not(bookmarksPopup) {
  149.   padding-block: 3px !important; /* above and below each item */
  150.   margin-left: -2px !important; /* margin is the outer space around an item */
  151.   padding-left: 8px !important; /* padding is the inner space inside an item */
  152.   margin-right: 0px !important;
  153.   padding-right: 6px !important;
  154. }
  155.  
  156. /* 04.1 removing padding for the menu itself so that the highlighting of a menu item covers the whole line */
  157. menupopup {
  158.   --panel-padding: 0px !important;
  159. }
  160.  
  161. /* 04.2 removing padding for separators in menus */
  162. menuseparator {
  163.   padding-block: 0px !important;
  164. }
  165.  
  166. /* 04.3 padding in the application menu ("hamburger menu") and extensions menu */
  167. #unified-extensions-panel /* extensions menu */ {
  168. --panel-menuitem-margin: 0px !important;
  169. --panel-menuitem-margin-inline: 0px !important;
  170. --panel-menuitem-padding: 0px !important;
  171. --panel-menuitem-padding-inline: 3px !important;
  172. }
  173. #appMenu-mainView /* application menu */ {
  174. --panel-menuitem-padding: 2px !important;
  175. --panel-menuitem-margin: 0px !important; /* only affects the Zoom line */
  176. }
  177. #appMenu-zoom-controls /* additional zoom line padding (height) */ {
  178.   padding: 0px !important;
  179. }
  180. /* vertical padding of "Extensions" title in the extensions menu */
  181. #unified-extensions-view .panel-header {
  182.   min-height: 25px !important;
  183. }
  184. /* vertical padding of the application menu (top and bottom) */
  185. #appMenu-mainView .panel-subview-body  {
  186.   padding: 0px !important;
  187. }
  188.  
  189. /* 04.5 fixing the visibility of badges (tickers) on addon icons in the extensions menu (they get cut off vertically due to the padding changes above) */
  190. #unified-extensions-view .toolbarbutton-badge {
  191.   margin-top: 0px !important;
  192.   max-width: 100% !important;
  193. }
  194.  
  195. /* Reducing the padding in the autofill menu */
  196. .autocomplete-richlistitem {
  197.   margin-top: -5px !important;
  198. }
  199. .autocomplete-richlistbox {
  200.   margin: -8px !important;
  201. }
Advertisement
Add Comment
Please, Sign In to add comment