|
| 1 | +/* Firefox userChrome.css tweaks ****************************************************************/ |
| 2 | +/* Github: https://github.com/aris-t2/customcssforfx ********************************************/ |
| 3 | +/************************************************************************************************/ |
| 4 | + |
| 5 | + |
| 6 | +:root { |
| 7 | + /* variable for tabs below navigation toolbar option */ |
| 8 | + --tab_below_navigation_toolbar_bottom_padding: calc( var(--tab-min-height) + 0.5px ) !important; |
| 9 | + |
| 10 | + /* variable for tabs below navigation toolbar option on macOS */ |
| 11 | + --tab_below_navigation_toolbar_bottom_padding_macOS: calc( var(--tab-min-height) + 1px ) !important; |
| 12 | + --tab_below_navigation_toolbar_toolbox_top_padding_macOS: calc(-1px + var(--tab-min-height)) !important; |
| 13 | + |
| 14 | + /* variable for tabs below main content option */ |
| 15 | + --tab_below_main_content_bottom_margin: calc(3px + var(--tab-min-height)) !important; |
| 16 | + --tab_below_main_content_toolbar_height: calc(2px + var(--tab-min-height)) !important; |
| 17 | + --tab_below_main_content_top_margin: 0px !important; |
| 18 | + |
| 19 | +} |
| 20 | + |
| 21 | +/* make tabs look like tabs again */ |
| 22 | +.tab-background { |
| 23 | + border-radius: 0px !important; |
| 24 | + margin-block: 0px !important; |
| 25 | +} |
| 26 | + |
| 27 | +.tab-background[multiselected=true], |
| 28 | +.tab-background[selected=true] { |
| 29 | + background-color: var(--toolbar-bgcolor) !important; |
| 30 | + background-image: var(--toolbar-bgimage) !important; |
| 31 | +} |
| 32 | + |
| 33 | +/* remove left and right tab spaces */ |
| 34 | +#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs]) > #tabbrowser-arrowscrollbox > .tabbrowser-tab[first-visible-unpinned-tab] { |
| 35 | + margin-inline-start: 0px !important; |
| 36 | +} |
| 37 | + |
| 38 | +.tabbrowser-tab { |
| 39 | + padding-inline: 0px !important; |
| 40 | + border-radius: 0px !important; |
| 41 | +} |
| 42 | + |
| 43 | +/* adjust 'new tab' tab */ |
| 44 | +#tabs-newtab-button { |
| 45 | + padding-inline: 1px !important; |
| 46 | + border-radius: 0px !important; |
| 47 | +} |
| 48 | + |
| 49 | +#tabs-newtab-button .toolbarbutton-icon { |
| 50 | + border-radius: 0px !important; |
| 51 | +} |
| 52 | + |
| 53 | +/* reduce scrollbuttons size */ |
| 54 | +#scrollbutton-up, |
| 55 | +#scrollbutton-down { |
| 56 | + padding: 0 !important; |
| 57 | + border-radius: 0 !important; |
| 58 | +} |
| 59 | + |
| 60 | +/*tab line for active tab */ |
| 61 | +.tabbrowser-tab .tab-context-line { |
| 62 | + height: 2px !important; |
| 63 | + border-radius: 0px !important; |
| 64 | +} |
| 65 | + |
| 66 | +.tabbrowser-tab[selected]:not([usercontextid]) .tab-context-line { |
| 67 | + background-color: Highlight !important; |
| 68 | +} |
| 69 | + |
| 70 | +#main-window:not([lwtheme-image="true"]):not([lwtheme-mozlightdark]):-moz-lwtheme .tabbrowser-tab[selected]:not([usercontextid]) .tab-context-line { |
| 71 | + background-color: var(--tab-line-color,Highlight) !important; |
| 72 | +} |
| 73 | + |
| 74 | +.tabbrowser-tab[usercontextid] > .tab-stack > .tab-background > .tab-context-line { |
| 75 | + margin: unset !important; |
| 76 | + background-color: var(--identity-icon-color) !important; |
| 77 | +} |
| 78 | + |
| 79 | +/* border between navigation toolbar and tabs toolbar */ |
| 80 | +#nav-bar:not(:-moz-lwtheme) { |
| 81 | + box-shadow: 0 calc(-1 * var(--tabs-navbar-shadow-size)) 0 var(--chrome-content-separator-color) !important; |
| 82 | +} |
| 83 | + |
| 84 | +#nav-bar:-moz-lwtheme { |
| 85 | + box-shadow: unset !important; |
| 86 | +} |
| 87 | + |
| 88 | +/* Tab separators: modified Fx88s browser.css code */ |
| 89 | +.titlebar-spacer[type="pre-tabs"] { |
| 90 | + border-inline-end: 1px solid var(--lwt-background-tab-separator-color, currentColor); |
| 91 | + opacity: 0.2; |
| 92 | +} |
| 93 | + |
| 94 | +.tabbrowser-tab::after, |
| 95 | +.tabbrowser-tab::before { |
| 96 | + border-left: 1px solid var(--lwt-background-tab-separator-color, currentColor); |
| 97 | + margin-block: 5px 4px; |
| 98 | + opacity: 0.3; |
| 99 | +} |
| 100 | + |
| 101 | +.tabbrowser-tab::before { |
| 102 | + margin-inline-start: -1px; |
| 103 | +} |
| 104 | + |
| 105 | +:root[tabsintitlebar]:not([extradragspace]) #toolbar-menubar[autohide=true] + #TabsToolbar .tabbrowser-tab::after, |
| 106 | +.tabbrowser-tab:hover::after, |
| 107 | +#tabbrowser-tabs:not([movingtab]) > #tabbrowser-arrowscrollbox > .tabbrowser-tab[beforehovered]::after, |
| 108 | +.tabbrowser-tab[multiselected]::after, |
| 109 | +#tabbrowser-tabs:not([movingtab]) > #tabbrowser-arrowscrollbox > .tabbrowser-tab[before-multiselected]::after { |
| 110 | + margin-top: var(--tabs-top-border-width); |
| 111 | + margin-bottom: 0; |
| 112 | +} |
| 113 | + |
| 114 | +#tabbrowser-tabs:not([movingtab]) > #tabbrowser-arrowscrollbox > .tabbrowser-tab[beforeselected-visible]::after, |
| 115 | +#tabbrowser-tabs[movingtab] > #tabbrowser-arrowscrollbox > .tabbrowser-tab[visuallyselected]::before, |
| 116 | +.tabbrowser-tab[visuallyselected]::after { |
| 117 | + border-color: var(--tabs-border-color); |
| 118 | + margin-top: 0; |
| 119 | + margin-bottom: var(--tabs-navbar-shadow-size); |
| 120 | + opacity: 0.1; |
| 121 | +} |
| 122 | + |
| 123 | +.tabbrowser-tab::after, |
| 124 | +#tabbrowser-tabs[movingtab] > #tabbrowser-arrowscrollbox > .tabbrowser-tab[visuallyselected]::before { |
| 125 | + content: ""; |
| 126 | + display: block; |
| 127 | +} |
| 128 | + |
| 129 | +/* remove active tabs left and right tab border color when using lw-themes */ |
| 130 | +:root:not([lwtheme-mozlightdark]) #TabsToolbar:not([brighttext]) #tabbrowser-tabs:not([noshadowfortests]) .tabbrowser-tab:is([visuallyselected=true], [multiselected]) > .tab-stack > .tab-background:-moz-lwtheme, |
| 131 | +:root:not([lwtheme-mozlightdark]) #TabsToolbar[brighttext] #tabbrowser-tabs:not([noshadowfortests]) .tabbrowser-tab:is([visuallyselected=true], [multiselected]) > .tab-stack > .tab-background:-moz-lwtheme { |
| 132 | + box-shadow: unset !important; |
| 133 | +} |
| 134 | + |
| 135 | +.tab-background:is([selected], [multiselected]):-moz-lwtheme { |
| 136 | + border: 0 !important; |
| 137 | +} |
| 138 | + |
| 139 | +/* tab height fix ESR 91.6, 96.0.2, 97+ */ |
| 140 | +#tabbrowser-tabs:not([secondarytext-unsupported]) .tab-label-container { |
| 141 | + height: unset !important; |
| 142 | +} |
| 143 | + |
| 144 | +/* Fx 100+ outline fix */ |
| 145 | +#TabsToolbar #firefox-view-button[open] > .toolbarbutton-icon:-moz-lwtheme, |
| 146 | +.tab-background[selected]:-moz-lwtheme { |
| 147 | + outline: unset !important; |
| 148 | +} |
| 149 | + |
| 150 | +/* Fx 101+ */ |
| 151 | +@media (-moz-platform: windows-win10), (-moz-os-version:windows-win10) { |
| 152 | + |
| 153 | + #main-window[sizemode="maximized"][tabsintitlebar] #titlebar { |
| 154 | + margin-top: -1px !important; |
| 155 | + } |
| 156 | +} |
| 157 | + |
| 158 | +/* Fx 105+ - remove Firefox-view-button from tabs toolbar */ |
| 159 | +:root:not([privatebrowsingmode=temporary]) :is(toolbarbutton, toolbarpaletteitem) + #tabbrowser-tabs, |
| 160 | +:root[privatebrowsingmode=temporary] :is(toolbarbutton:not(#firefox-view-button), toolbarpaletteitem:not(#wrapper-firefox-view-button)) + #tabbrowser-tabs { |
| 161 | + border-inline-start: 0px solid color-mix(in srgb, currentColor 25%, transparent) !important; |
| 162 | +} |
| 163 | + |
| 164 | +:root:not([privatebrowsingmode=temporary]):not([firefoxviewhidden]) :is(#firefox-view-button, #wrapper-firefox-view-button) + #tabbrowser-tabs:not([overflow]) { |
| 165 | + padding-inline-start: 0 !important; |
| 166 | + margin-inline-start: 0 !important; |
| 167 | +} |
| 168 | + |
| 169 | +#firefox-view-button { |
| 170 | + display: none !important; |
| 171 | +} |
| 172 | + |
| 173 | +/* Fx 106+*/ |
| 174 | +#private-browsing-indicator-with-label { |
| 175 | + display: none !important; |
| 176 | +} |
| 177 | + |
| 178 | +#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs]) > #tabbrowser-arrowscrollbox > .tabbrowser-tab:nth-child(1 of :not([pinned], [hidden])) { |
| 179 | + margin-inline-start: 0px !important; |
| 180 | +} |
| 181 | + |
0 commit comments