Razor512

Firefox 126+ Compact UI (Density must be set to compact)

May 6th, 2020 (edited)
355
0
Never
4
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 9.59 KB | None | 0 0
  1. @media (-moz-os-version: windows-win10) {
  2.   *.textbox-input,
  3.   *.textbox-textarea {
  4.     margin-top: -3px !important;
  5.   }
  6. }
  7.  
  8. @media (-moz-os-version: windows-win7) {
  9.   *.textbox-input,
  10.   *.textbox-textarea {
  11.     margin-top: -2px !important;
  12.   }
  13. }
  14.  
  15. #alltabs-button {
  16.   height: 8px !important;
  17.   padding: 0 !important;
  18.   margin: 0 !important;
  19. }
  20.  
  21. #TabsToolbar:not(:-moz-lwtheme) .tabbrowser-tab {
  22.   color: var(--classic_squared_tabs_tab_text_color) !important;
  23.   text-shadow: 1px 1px 1px var(--classic_squared_tabs_tab_text_shadow) !important;
  24.   margin-top: -2px !important;
  25.   padding-right: 8px !important;
  26. }
  27.  
  28. #TabsToolbar {
  29.   position: relative !important;
  30.   bottom: 0 !important;
  31.   width: 100vw !important;
  32.   max-height: 18px !important;
  33. }
  34.  
  35. #tabbrowser-tabs {
  36.   height: 18px !important;
  37. }
  38.  
  39. #scrollbutton-up .toolbarbutton-icon,
  40. #scrollbutton-down .toolbarbutton-icon {
  41.   margin-top: -11px !important;
  42.   margin-bottom: -8px !important;
  43. }
  44.  
  45. #tabs-newtab-button,
  46. #TabsToolbar #new-tab-button {
  47.   padding-top: 6px !important;
  48. }
  49.  
  50. .tab-content,
  51. .tabbrowser-tab[visuallyselected="true"] {
  52.   padding: 0 2px !important;
  53.   height: 18px !important;
  54. }
  55.  
  56. #nav-bar:not([tabs-hidden="true"]) {
  57.   position: relative;
  58.   z-index: 4 !important;
  59. }
  60.  
  61. #toolbar-menubar {
  62.   min-height: 9px !important;
  63.   height: 15px !important;
  64.   margin-top: -1px !important;
  65.   margin-bottom: 2px !important;
  66. }
  67.  
  68. #nav-bar {
  69.   border-top-width: 0 !important;
  70.   padding-top: 0 !important;
  71.   padding-bottom: 0 !important;
  72.   height: 12px !important;
  73.   margin-top: -1px !important;
  74.   margin-bottom: -1px !important;
  75. }
  76.  
  77. #nav-bar .toolbarbutton-1 {
  78.   min-height: 23px !important;
  79.   height: 23px !important;
  80.   padding-top: 4px !important;
  81.   margin-top: 1px !important;
  82. }
  83.  
  84. toolbar .toolbarbutton-1 {
  85.   scale: 80% !important;
  86.   margin-top: 1px !important;
  87.   appearance: auto !important;
  88. }
  89.  
  90. #downloads-button {
  91.   padding-bottom: 6px !important;
  92. }
  93.  
  94. #forward-button,
  95. #back-button,
  96. #reload-button,
  97. #home-button,
  98. #PlacesChevron,
  99. #nav-bar-overflow-button {
  100.   margin-top: 5px !important;
  101.   scale: 90% !important;
  102. }
  103.  
  104. toolbar .toolbarbutton-1 > .toolbarbutton-icon {
  105.   margin-top: -13px !important;
  106. }
  107.  
  108. #urlbar,
  109. .searchbar-textbox {
  110.   margin: 0 !important;
  111.   margin-top: -4px !important;
  112.   min-height: 0 !important;
  113. }
  114.  
  115. #firefox-view-button {
  116.   padding-top: 9px !important;
  117. }
  118.  
  119. #tracking-protection-icon-animatable-box {
  120.   height: 15px !important;
  121. }
  122.  
  123. #searchbar {
  124.   margin: 0 !important;
  125.   margin-top: 0 !important;
  126.   min-height: 0 !important;
  127.   height: 19px !important;
  128. }
  129.  
  130. #searchbar .searchbar-textbox {
  131.   padding: 7px 2px 3px !important;
  132. }
  133.  
  134. #main-window:not([tabsintitlebar]) #nav-bar,
  135. #main-window:not([tabsintitlebar]) #navigator-toolbox {
  136.   border-top: 0 !important;
  137.   box-shadow: unset !important;
  138. }
  139.  
  140. #main-window[uidensity=compact] #nav-bar #nav-bar-customization-target > toolbaritem {
  141.   margin: 0 !important;
  142.   padding: 0 !important;
  143. }
  144.  
  145. #navigator-toolbox #TabsToolbar .close-icon > .toolbarbutton-icon {
  146.   min-width: 16px !important;
  147.   width: 16px !important;
  148.   min-height: 16px !important;
  149.   height: 16px !important;
  150.   padding: 0 !important;
  151. }
  152.  
  153. #nav-bar:not(:-moz-lwtheme),
  154. toolbar:not(#TabsToolbar):not(#toolbar-menubar):not(#nav-bar):not(:-moz-lwtheme) {
  155.   -moz-appearance: none !important;
  156.   box-shadow: unset !important;
  157. }
  158.  
  159. #tabbrowser-tabs,
  160. #tabbrowser-tabs > .tabbrowser-arrowscrollbox,
  161. .tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned] {
  162.   min-height: 15px !important;
  163. }
  164.  
  165. #titlebar-close {
  166.   margin-top: 10px !important;
  167.   padding-top: 0 !important;
  168.   padding-bottom: 0 !important;
  169. }
  170.  
  171. #titlebar-max {
  172.   margin-top: 0 !important;
  173.   padding-top: 0 !important;
  174.   padding-bottom: 0 !important;
  175. }
  176.  
  177. #titlebar-min {
  178.   margin-top: -1px !important;
  179.   padding-top: 0 !important;
  180.   padding-bottom: 0 !important;
  181. }
  182.  
  183. .titlebar-min,
  184. .titlebar-max,
  185. :root[sizemode="maximized"] .titlebar-max,
  186. .titlebar-close {
  187.   padding-bottom: 0 !important;
  188.   padding-top: 0 !important;
  189. }
  190.  
  191. .titlebar-button {
  192.   padding: 2px 17px !important;
  193. }
  194.  
  195. #navigator-toolbox[movingtab] > #titlebar > #TabsToolbar {
  196.   padding-bottom: -1px !important;
  197. }
  198.  
  199. #navigator-toolbox[movingtab] #tabbrowser-tabs {
  200.   padding-bottom: unset !important;
  201.   margin-bottom: unset !important;
  202. }
  203.  
  204. #navigator-toolbox[movingtab] > #nav-bar {
  205.   margin-top: unset !important;
  206. }
  207.  
  208. toolbar .toolbarbutton-1 > .toolbarbutton-icon > tabs-newtab-button {
  209.   width: calc(2 * var(--toolbarbutton-inner-padding) + 16px);
  210.   height: calc(2 * var(--toolbarbutton-inner-padding) + 16px);
  211.   margin-top: -11px !important;
  212. }
  213.  
  214. #TabsToolbar .toolbarbutton-1 {
  215.   margin: -4px 0 -4px 0 !important;
  216. }
  217.  
  218. #main-window:not([chromehidden*="toolbar"]) #navigator-toolbox {
  219.   padding-bottom: calc(1px + var(--tab-min-height_tnot)) !important;
  220. }
  221.  
  222. @media (-moz-os-version: windows-win10),
  223.        (-moz-os-version: windows-win8),
  224.        (-moz-os-version: windows-win7) {
  225.   #main-window[tabsintitlebar]:not([inDOMFullscreen="true"]) #toolbar-menubar[autohide="true"] ~ #TabsToolbar .titlebar-buttonbox-container {
  226.     top: 1px !important;
  227.   }
  228.  
  229.   #main-window[tabsintitlebar][sizemode="maximized"]:not([inDOMFullscreen="true"]) #toolbar-menubar[autohide="true"] ~ #TabsToolbar .titlebar-buttonbox-container {
  230.     top: 8px !important;
  231.   }
  232. }
  233.  
  234. @media (-moz-os-version: windows-win7) {
  235.   @media all and (-moz-windows-compositor) {
  236.     #main-window[tabsintitlebar]:not([inDOMFullscreen="true"]) #toolbar-menubar[autohide="true"] ~ #TabsToolbar .titlebar-buttonbox-container {
  237.       display: none !important;
  238.     }
  239.   }
  240.  
  241.   @media not all and (-moz-windows-compositor) {
  242.     #main-window[tabsintitlebar]:not([inDOMFullscreen="true"]) #toolbar-menubar[autohide="true"] ~ #TabsToolbar .titlebar-buttonbox-container {
  243.       top: -2px !important;
  244.     }
  245.  
  246.     #main-window[tabsintitlebar][sizemode="maximized"]:not([inDOMFullscreen="true"]) #toolbar-menubar[autohide="true"] ~ #TabsToolbar .titlebar-buttonbox-container {
  247.       top: 0px !important;
  248.     }
  249.  
  250.     #main-window[tabsintitlebar]:not([inDOMFullscreen="true"]) #toolbar-menubar[autohide="true"]:not([inactive="true"]) ~ #TabsToolbar .titlebar-buttonbox-container {
  251.       display: none !important;
  252.     }
  253.   }
  254. }
  255.  
  256. @media (-moz-os-version: windows-win10) {
  257.   #main-window:not([tabsintitlebar]) menubar > menu:not(:-moz-lwtheme):hover:not([disabled="true"]),
  258.   #main-window:not([tabsintitlebar]) menubar > menu:not(:-moz-lwtheme)[_moz-menuactive="true"]:not([disabled="true"]) {
  259.     background-color: Highlight !important;
  260.     color: HighlightText !important;
  261.   }
  262. }
  263.  
  264. #main-window[tabsintitlebar][sizemode="fullscreen"] #toolbar-menubar[autohide="true"] ~ #TabsToolbar .titlebar-buttonbox-container,
  265. #main-window[tabsintitlebar][sizemode="fullscreen"] #navigator-toolbox #PanelUI-button,
  266. #main-window #TabsToolbar #window-controls {
  267.   display: none !important;
  268. }
  269.  
  270. #TabsToolbar .private-browsing-indicator,
  271. #TabsToolbar #window-controls,
  272. #TabsToolbar *[type="caption-buttons"],
  273. #TabsToolbar *[type="pre-tabs"],
  274. #TabsToolbar *[type="post-tabs"] {
  275.   display: none !important;
  276. }
  277.  
  278. @media (-moz-windows-classic) {
  279.   #nav-bar:not(:-moz-lwtheme),
  280.   #PersonalToolbar:not(:-moz-lwtheme),
  281.   #main-window:not([tabsintitlebar]) #TabsToolbar:not(:-moz-lwtheme) {
  282.     border-left: unset !important;
  283.     border-right: unset !important;
  284.   }
  285.  
  286.   #main-window[sizemode="normal"] #navigator-toolbox :-moz-any(#nav-bar, #PersonalToolbar, #TabsToolbar) {
  287.     border-left: 0 !important;
  288.     border-right: 0 !important;
  289.   }
  290.  
  291.   #main-window:not([tabsintitlebar]) #toolbar-menubar:not(:-moz-lwtheme) {
  292.     background: unset !important;
  293.     box-shadow: unset !important;
  294.     border-bottom: unset !important;
  295.   }
  296.  
  297.   #main-window:not([tabsintitlebar]):not(:-moz-lwtheme) #navigator-toolbox,
  298.   #main-window:not([tabsintitlebar]):not(:-moz-lwtheme) #nav-bar,
  299.   #main-window:not([tabsintitlebar]):not(:-moz-lwtheme) #navigator-toolbox::before,
  300.   #main-window:not([tabsintitlebar]):not(:-moz-lwtheme) #nav-bar::before,
  301.   #main-window:not([tabsintitlebar]):not(:-moz-lwtheme) #navigator-toolbox::after,
  302.   #main-window:not([tabsintitlebar]):not(:-moz-lwtheme) #nav-bar::after {
  303.     box-shadow: unset !important;
  304.     border: unset !important;
  305.     border-image: unset !important;
  306.   }
  307. }
  308.  
  309. #main-window:not([tabsintitlebar]) #toolbar-menubar:not(:-moz-lwtheme) {
  310.   background-image: var(--colored_menubar_background_image) !important;
  311.   border: 0 !important;
  312.   margin-bottom: -1px !important;
  313. }
  314.  
  315. #nav-bar:not(:-moz-lwtheme) {
  316.   -moz-appearance: none !important;
  317.   background: var(--general_toolbar_color_navbar, inherit) !important;
  318. }
  319.  
  320. toolbar:not(#TabsToolbar):not(#toolbar-menubar):not(#nav-bar):not(:-moz-lwtheme) {
  321.   -moz-appearance: none !important;
  322.   background: linear-gradient(#f9f9fa, #f9f9fa) !important;
  323. }
  324.  
  325. #TabsToolbar:not(:-moz-lwtheme) {
  326.   -moz-appearance: none !important;
  327.   background-image: var(--tabs_toolbar_color_tabs_not_on_top) !important;
  328. }
  329.  
  330. #main-window[style*='--lwt-header-image'] :-moz-any(#nav-bar, #PersonalToolbar, #TabsToolbar):-moz-lwtheme {
  331.   background: unset !important;
  332. }
  333.  
  334. #main-window:not([style*='--lwt-header-image']) #TabsToolbar:-moz-lwtheme {
  335.   -moz-appearance: none !important;
  336.   background-image: linear-gradient(var(--toolbar-bgcolor), var(--toolbar-bgcolor)) !important;
  337. }
  338.  
  339. #TabsToolbar:not(:-moz-lwtheme) .tabbrowser-tab .tab-content[selected="true"] {
  340.   background-image: linear-gradient(#f9f9fa, #f9f9fa) !important;
  341. }
  342.  
  343. #TabsToolbar:not(:-moz-lwtheme),
  344. #TabsToolbar:not(:-moz-lwtheme)::before,
  345. #TabsToolbar:not(:-moz-lwtheme)::after {
  346.   box-shadow: unset !important;
  347. }
  348.  
Tags: firefox
Advertisement
Comments
  • Razor512
    2 years (edited)
    Comment was deleted
  • Razor512
    2 years
    # text 0.24 KB | 0 0
    1. In about:config the following preference must be set to true in order to enable the compact mode setting:
    2. browser.compactmode.show
    3. More detailed instructions can be found in https://support.mozilla.org/en-US/kb/compact-mode-workaround-firefox
  • Razor512
    1 year (edited)
    Comment was deleted
  • Razor512
    1 year
    # text 1.04 KB | 0 0
    1. If you have not used the user chrome function in Firefox before, then you may need to enable the ability to load the CSS file.
    2. To enable it:
    3. 1: Go to about:config
    4. 2: In the search bar on the config page, enter the following text
    5. toolkit.legacyUserProfileCustomizations.stylesheets
    6. 3: There should be one result that you can change its value to "True".
    7.  
    8. After that, restart firefox, and it should load the css file (without the quotation makes, named "userChrome.css")
    9.  
    10. The default location for it is C:\Users\your user name\AppData\Roaming\Mozilla\Firefox\Profiles\randomly generated name will be here.default-release\chrome
    11.  
    12. Once that is done, the compact UI css should load find and if the UI density is set to "Compact" in the toolbar settings menu (found by right clicking on a tool bar such as the tabs toolbar, and then clicking on "Customize Toolbar" and then changing the density to "Compact".
    13.  
    14. Also make sure that Menu Bar is enabled in the Toolbars dropdown menu (located in the lower left hand corner of the Customize Firefox page).
Add Comment
Please, Sign In to add comment