Guest User

Minimal Firefox CSS

a guest
Nov 26th, 2017
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 15.94 KB | None | 0 0
  1. @namespace html url(http://www.w3.org/1999/xhtml);
  2. @namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
  3. /*
  4.  
  5.     Useful search tags within this css:
  6.     "url-bar visible", "bottom margin", "attach url-bar", "newtab button", "back/forward", "enable scrollbar"
  7.  
  8.  
  9.     To enable bitmap fonts in Firefox 44+; open "about:config" and set the following preference to "false":
  10.     "gfx.font_rendering.fontconfig.fontlist.enabled"
  11. */
  12.  
  13.  
  14. :root {
  15.     /* TAB VARIABLES */
  16.     --bg-light: #181512; --bg-dark: #181512;
  17.     --fg-light: #bea492; --fg-dark: #817267;
  18.     --tab-triangle-correction: -1px;
  19.     --tab-height: 20px; --tab-icon-size: 12px; --tab-strip-margin: -12px; --tab-overlap: -5px;
  20.     --tab-fonts: "Artwiz Lemon"; --tab-font-size: 7pt;
  21.     --tab-text-align: center; /* left | center | right */
  22.     --tab-triangle: none;  /* block | none */
  23.  
  24.     /* URL VARIABLES */
  25.     --url-background: var(--bg-light); --url-color: var(--fg-dark);
  26.     --url-height: 20px; --url-right-margin: 6px;
  27.     --url-fonts: "Artwiz Lemon"; --url-font-size: 7pt;
  28.     --url-text-align: center; /* left | center | right */
  29.     --url-position: absolute; /* absolute == top (under tabs) || fixed == bottom of browser */
  30. }
  31.  
  32.  
  33. @-moz-document url(chrome://browser/content/browser.xul) {
  34.     /* URL-BAR */
  35.     #back-button, #forward-button, #back-button *, #forward-button *, #identity-box, #urlbar-reload-button, #urlbar-stop-button, #urlbar-go-button,
  36.     #PanelUI-button, #bookmarks-menu-button, #downloads-button, #home-button, #stylish-toolbar-button, #abp-toolbarbutton,
  37.     #notification-popup-box, #new-tab-button, #private-browsing-indicator, #search-container, #nav-bar-overflow-button,
  38.     .tabs-newtab-button, .tab-close-button, .tab-close, .tab-throbber, .tab-background-start, .tab-background-end,
  39.     #pocket-button, #loop-button, #social-share-button, #window-controls
  40.     /*#alltabs-button, #tabview-button, .tab-icon-image*/, .tab-icon-image:not([pinned]) { display: none !important; }
  41.    
  42.     * { box-sizing: border-box !important; }
  43.    
  44.     /* --- Comment out the section below to remove the newtab button --- */
  45.     /**/
  46.     .tabs-newtab-button { display: block !important; background: transparent !important; margin: 0 8px 0 0 !important; width: 24px !important; }
  47.     .tabs-newtab-button::before { content: "+" !important; }
  48.     /**/
  49.    
  50.     .tab-drop-indicator { margin-bottom: 0 !important; }
  51.    
  52.    
  53.     /*#browser { margin-bottom: var(--url-height) !important; }/**/ /* Uncomment to enable bottom margin */
  54.    
  55.     #navigator-toolbox { background: var(--url-background) !important; }
  56.     #navigator-toolbox * { clip: auto !important; clip-path: none !important; }
  57.    
  58.     #nav-bar {
  59.         position: var(--url-position) !important; bottom: 0 !important;
  60.         width: 100% !important; height: var(--url-height) !important;
  61.         margin: 0 !important; background: transparent !important;
  62.            
  63.         /* --- Uncomment section below to attach url-bar to the tab-bar [EXPERIMENTAL] (Require a line in "#TabsToolbar" below) --- */
  64.         /*
  65.         position: fixed !important; top: 0 !important; left: 0 !important;
  66.         width: 315px !important; max-width: 315px !important;
  67.         z-index: 100 !important;
  68.         /**/
  69.     }
  70.         #nav-bar-customization-target, #urlbar-container, #urlbar {
  71.             margin: 0 !important; padding: 0 !important;
  72.             width: 100% !important; height: 100% !important;
  73.             border-radius: 0 !important;
  74.         }
  75.             #nav-bar-customization-target {
  76.                 position: absolute !important; top: -1px !important; left: 0 !important; height: calc(100% - 1px) !important; /* (bottom margin - height switch +/-) */
  77.             }
  78.                 #urlbar {
  79.                     border: none !important; padding: 0 2px 0 8px !important;
  80.                     background: var(--url-background) !important; color: var(--url-color) !important;
  81.                     font-family: var(--url-fonts) !important; font-size: var(--url-font-size) !important;
  82.                     text-align: var(--url-text-align) !important;
  83.                     height: 100% !important;
  84.                 }
  85.                 /*#urlbar * { -moz-appearance: none !important; }*/
  86.    
  87.                 .urlbar-textbox-container .urlbar-input-box .textbox-input {
  88.                     height: var(--url-height) !important;
  89.                 }
  90.    
  91.    
  92.     /* --- Uncomment the section below to enable the back/forward buttons [EXPERIMENTAL] (Requires url-bar) --- */
  93.     /*
  94.     #back-button, #forward-button { display: block !important; }
  95.     #back-button::before, #forward-button::before {
  96.         display: inline-block !important; position: absolute !important;
  97.         width: var(--url-height) !important; height: var(--url-height) !important; top: 0 !important;
  98.         text-align: center !important; line-height: var(--url-height) !important;
  99.     }
  100.     #back-button::before { content: "<" !important; left: 0 !important; }
  101.     #forward-button::before { content: ">" !important; left: calc(var(--url-height) + 8px) !important; }
  102.     #urlbar { padding-left: calc((var(--url-height) * 2) + 8px) !important; }
  103.     /**/
  104.    
  105.    
  106.     /* --- Comment out the section below to make the url-bar visible --- */
  107.     /*
  108.     #nav-bar {
  109.         width: 0 !important; height: 0 !important;
  110.         position: fixed !important; left: -1px !important; top: -1px !important;
  111.         overflow: hidden !important; visibility: hidden !important;
  112.     }
  113.     /**/
  114.    
  115.     /* TABS */
  116.     .tabbrowser-tab[fadein]:not([pinned]) { min-width: 100px !important; max-width: /*180px*/ 100% !important; }
  117.     tab {
  118.         font-family: var(--tab-fonts) !important;
  119.         height: var(--tab-height) !important; min-height: var(--tab-height) !important;
  120.         background: var(--bg-dark) !important; color: var(--fg-dark) !important;
  121.         font-size: var(--tab-font-size); text-shadow: none !important; text-align: var(--tab-text-align) !important;
  122.     }
  123.    
  124.     .tabbrowser-tab label { padding: 0 22px 0 22px !important; }
  125.    
  126.     #tabbrowser-tabs .tabbrowser-tab[pinned]            { width: 48px !important; }
  127.     #tabbrowser-tabs .tabbrowser-tab[pinned] label      { display: none !important; }
  128.    
  129.     #tabbrowser-tabs .tabbrowser-tab .tab-icon-image {
  130.         margin: 0 -10px 0 16px !important;
  131.         width: var(--tab-icon-size) !important;
  132.         height: var(--tab-icon-size) !important;
  133.     }
  134.    
  135.     .tabbrowser-tab *, .tabs-newtab-button * {
  136.         background: none !important; list-style-image: none !important;
  137.         margin: 0 0 0 0 !important; padding: 0 0 0 0 !important;
  138.         -moz-appearance: none !important;
  139.     }
  140.    
  141.     #alltabs-button { margin-left: -10px !important; }
  142.    
  143.     #tabbrowser-tabs .tabbrowser-tab[pinned] .tab-stack { height: var(--tab-height) !important; width: 100% !important; }
  144.     #tabbrowser-tabs .tabbrowser-arrowscrollbox, #tabbrowser-tabs .tabbrowser-arrowscrollbox .box-inherit.scrollbox-innerbox {
  145.         max-height: var(--tab-height) !important;
  146.     }
  147.     .scrollbutton-up, .scrollbutton-down { border: none !important; }
  148.    
  149.     #tabbrowser-tabs[overflow]:not([positionpinnedtabs]) { -moz-padding-start: 20px !important; }
  150.    
  151.     .tabbrowser-tab[selected="true"] .tab-stack {
  152.         background: var(--bg-light) !important; color: var(--fg-light) !important;
  153.         border-radius: 0px !important; position: relative !important;
  154.         /*border-top: 1px solid #dc52a5 !important;/**/
  155.     }
  156.     .tabbrowser-tab[selected="true"]:before { /* Left Triangle (of selected tab) */
  157.         content: '' !important; display: var(--tab-triangle);
  158.         position: absolute !important; top: 0 !important; left: var(--tab-overlap) !important;
  159.         width: 0 !important; height: 0 !important;
  160.         border: none !important; z-index: 2 !important;
  161.        
  162.         /**/
  163.         border-left: calc(var(--tab-height)/2) solid var(--bg-dark) !important;
  164.         border-top: calc((var(--tab-height)/2) - var(--tab-triangle-correction)) solid var(--bg-light) !important;
  165.         border-bottom: calc((var(--tab-height)/2) + var(--tab-triangle-correction)) solid var(--bg-light) !important;
  166.         /*
  167.         border-top: var(--tab-height) solid var(--bg-dark) !important;
  168.         border-right: calc(var(--tab-height)/2) solid var(--bg-light) !important;
  169.         /**/
  170.     }
  171.     .tabbrowser-tab[selected="true"]:after { /* Right Triangle (of selected tab) */
  172.         content: '' !important; display: var(--tab-triangle);
  173.         position: absolute !important; top: 0 !important; right: var(--tab-overlap) !important;
  174.         width: 0 !important; height: 0 !important;
  175.         border: none !important; z-index: 2 !important;
  176.        
  177.         /**/
  178.         border-right: calc(var(--tab-height)/2) solid var(--bg-dark) !important;
  179.         border-top: calc((var(--tab-height)/2) - var(--tab-triangle-correction)) solid var(--bg-light) !important;
  180.         border-bottom: calc((var(--tab-height)/2) + var(--tab-triangle-correction)) solid var(--bg-light) !important;
  181.         /*
  182.         border-top: var(--tab-height) solid var(--bg-dark) !important;
  183.         border-left: calc(var(--tab-height)/2) solid var(--bg-light) !important;
  184.         /**/
  185.     }
  186.    
  187.     #TabsToolbar, #tabbrowser-tabs {
  188.         -moz-appearance: none !important;
  189.         height: var(--tab-height) !important; min-height: var(--tab-height)!important;
  190.         margin: 0 var(--tab-strip-margin) !important;
  191.         background: var(--bg-dark) !important;
  192.        
  193.         /* --- Uncomment section below to attach url-bar to the tab-bar [EXPERIMENTAL] (Require a line in "#nav-bar" above) --- */
  194.         /*margin-left: 147px !important;/**/
  195.     }
  196.     #TabsToolbar::after { display: none !important; }
  197.     .tabbrowser-tab::before, .tabbrowser-tab::after { background: none !important; opacity: 1 !important; visibility: visible !important; }
  198.    
  199.     /*browser, #navigator-toolbox { -moz-appearance: none !important; background: transparent !important; }*/
  200.    
  201.     #navigator-toolbox::after { height: 0px !important; background: var(--bg-light) !important; }
  202.     #liberator-separator { height: 0px !important; background: var(--bg-light) !important; border-top: 0 !important; }
  203.    
  204.     /* MENUS */
  205.     menuitem + menuseparator, menu + menuseparator/*, .menu-iconic-left*/ { display: none !important; }
  206.     /*menuitem > label { margin-left: var(--tab-height) !important; }*/
  207.     /*menubar, menubutton, menulist, menu, menuitem {
  208.         font-family: var(--tab-fonts) !important; font-size: var(--tab-font-size);
  209.         height: var(--tab-height) !important;
  210.     }*/
  211.  
  212.     /* HIDE ORANGE MENU BUTTON */
  213.     #appmenu-toolbar-button, #appmenu-button-container { display: none !important; }
  214.    
  215.     /* HIDE STATUS BAR */
  216.     #status-bar, #statusbar-display, statuspanel { display: none !important; }
  217.  
  218.     /* PRIVATE BROWSING ICON HIDE */
  219.     #main-window[privatebrowsingmode=temporary] #private-browsing-indicator,
  220.     #main-window[privatebrowsingmode=temporary] #private-browsing-indicator-titlebar { display: none !important; }
  221.    
  222.     /* Vimperator icon style */
  223.     #liberator-statusline:not([customizing="true"]) { margin: -2px -2px !important; padding: 0 0 !important; height: 24px !important; }
  224.     #liberator-statusline:not([customizing="true"]) :-moz-any(toolbarbutton) { height: 100% !important; }
  225.     #tabview-button {
  226.         list-style-image: url(http://twily.info/img/tabview-button.png?v=2) /* 16x16 px image */ !important;
  227.         -moz-image-region: rect(0, 0, 0, 0) !important;
  228.     }
  229.    
  230.     #liberator-completions, #liberator-bottombar-deck { background: var(--bg-dark) !important; }
  231.    
  232.     /* Tabgroup margin top fix */
  233.     #tab-view-deck #tab-view { margin: 24px 12px 12px 12px !important; }
  234.     #tab-view-deck { background: var(--bg-light) !important; }
  235.    
  236.     window[sizemode="fullscreen"] #liberator-statusline { display: none !important; }
  237.     window[sizemode="fullscreen"] #liberator-bottombar  {
  238.         margin-top: -24px !important;
  239.         transition: 1s ease !important; transition-delay: .3s !important;
  240.     }
  241.     /*window[sizemode="fullscreen"] #browser-panel        { margin-top: -1px !important; }*/
  242. }
  243.  
  244.  
  245. /* Tab Group Page Style (Ctrl+Shift+E) */
  246. @-moz-document url(chrome://browser/content/tabview.html) {
  247.     #content #bg, #actions, body { background: var(--bg-light) !important; }
  248.     body * { color: var(--fg-light) !important; }
  249.    
  250.     body .groupItem, #content #actions, body .undo {
  251.         background: var(--bg-dark) !important;
  252.         border: 0 !important; border-radius: 0 !important; box-shadow: 0 0 0 0 !important;
  253.     }
  254.     #content #actions {
  255.         opacity: 0 !important; display: none !important; /* block | none */
  256.         transition: .3s ease-out !important;
  257.     }
  258.     #content #actions:hover { opacity: 1 !important; }
  259.    
  260.     body .appTabTrayContainer { border: 0 !important; }
  261.     body .tab, body .tab .thumb {
  262.         box-shadow: 0 0 0 0 !important; border: 0 !important; border-radius: 0 !important;
  263.         background: transparent !important; padding : 0 !important;
  264.     }
  265.     body .tab .favicon { display: none !important; }
  266.     body .groupItem .name { border: 0 !important; }
  267.     body .tab .tab-title { padding-top: 2px !important; }
  268. }
  269.  
  270.  
  271. /* AGENT_SHEET */
  272. @-moz-document url-prefix(http://), url-prefix(https://), url-prefix(chrome://liberator/), url-prefix(file:///) {
  273.     /* SCROLLBAR */
  274.     scrollbar[orient="vertical"], scrollbar thumb[orient="vertical"],
  275.     scrollbar[orient="horizontal"], scrollbar thumb[orient="horizontal"] {
  276.         display: none !important; /* block | none (enable scrollbar) */
  277.     }
  278.    
  279.     /*
  280.        Uncomment section below to apply style
  281.    
  282.        (width/height is controlled by the margin)
  283.     */
  284.     /*
  285.     scrollbar > slider { -moz-appearance: none !important; }
  286.    
  287.     scrollbar[orient="vertical"] { margin: 0 -10px 0 0 !important; }
  288.     scrollbar[orient='vertical'] > slider { background: #282333 !important; max-width: 100% !important; }
  289.     scrollbar[orient='vertical'] > slider > thumb {
  290.         -moz-appearance: none !important;
  291.         background: #524C59 !important; border: 0 !important; width: 100% !important;
  292.     }
  293.    
  294.     scrollbar[orient="horizontal"] { margin: 0 0 -10px 0 !important; }
  295.     scrollbar[orient='horizontal'] > slider { background: #282333 !important; max-height: 100% !important; }
  296.     scrollbar[orient='horizontal'] > slider > thumb {
  297.         -moz-appearance: none !important;
  298.         background: #524C59 !important; border: 0 !important; height: 100% !important;
  299.     }
  300.    
  301.     scrollbar > scrollbarbutton { -moz-appearance: none !important; border: none !important; background: none !important; }
  302.     scrollbar[orient='vertical'] > scrollbarbutton { min-height: 0 !important; }
  303.     scrollbar[orient='horizontal'] > scrollbarbutton { min-width: 0 !important; }
  304.     /**/
  305. }
  306.  
  307.  
  308. /* background color around/behind pictures opened in firefox (require html namespace on top) */
  309. @-moz-document regexp("(https?://|file:///)(.*)\\.(jpeg|jpg|gif|png|apng|svg|bmp|webm|webp)") {
  310.     body { background: var(--bg-light) !important; }
  311.     img.decoded { background-color: transparent !important; }
  312. }
  313.  
  314.  
  315. /* About:Blank background */
  316. @-moz-document url(about:blank) {
  317.     html,body { background: var(--bg-light) !important; }
  318. }
  319.  
  320. /* about:stylish-edit toolbar style */
  321. @-moz-document regexp("about:stylish-edit.*") {
  322.     #main-area, textbox { background: var(--bg-light) !important; }
  323.     textbox, grid, columns, rows, separator { border: 0 !important; }
  324.    
  325.     .devtools-toolbarbutton { background: var(--bg-dark) !important; color: var(--fg-light) !important; }
  326. }
  327.  
  328. /*----- Fix for white flash on new tab -----*/
  329. tabbrowser tabpanels, #appcontent > #content { background: var(--bg-light) !important; }
  330.  
  331.  
  332. /* Set dark text in light textareas */
  333. /*
  334. @-moz-document regexp("https?://(?!(localhost|twily.info|.*.4chan.org|.*.youtube.com)).*") {
  335.     input, textarea { color: #282333 !important; -moz-appearance: none !important; }
  336. }
  337. /**/
Advertisement
Add Comment
Please, Sign In to add comment