Last active
February 14, 2025 17:08
-
-
Save xypha/84956acff452352d623210b4fe328b4d to your computer and use it in GitHub Desktop.
userChrome.css for Firefox 135 onwards
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* CONTENTS | |
| + Enable userChrome.css | |
| + Force enable Reader View | |
| + Remove "List All Tabs" button | |
| + Removes items from Context Menu | |
| + Remove "Copy Link" | |
| + Customize | |
| + Tighten up drop-down/context/popup menu spacing (8 Sep 2021) | |
| + Proton Tabs Tweaks | |
| */ | |
| /* ------------------------------------------------------------------------------------------- | |
| + Enable userChrome.css | |
| Go to about:config and mark toolkit.legacyUserProfileCustomizations.stylesheets as TRUE | |
| */ | |
| @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); | |
| /* ------------------------------------------------------------------------------------------- | |
| + Force enable Reader View | |
| Source : https://superuser.com/a/1190577/391770 | |
| changed `-moz-box` to `flex` because of invalid property error | |
| last checked: 2024.12.17 | |
| */ | |
| /* | |
| #reader-mode-button { | |
| display: flex !important; | |
| visibility: visible !important; | |
| } */ | |
| /* ------------------------------------------------------------------------------------------- | |
| + Remove "List All Tabs" button | |
| Source : https://superuser.com/questions/1750467/how-can-i-remove-firefoxs-list-all-tabs-button | |
| Path : html#main-window body toolbox#navigator-toolbox vbox#titlebar toolbar#TabsToolbar.browser-toolbar.titlebar-color hbox.toolbar-items hbox#TabsToolbar-customization-target.customization-target toolbarbutton#alltabs-button.toolbarbutton-1.chromeclass-toolbar-additional.tabs-alltabs-button | |
| */ | |
| #alltabs-button { | |
| display: none !important; | |
| } | |
| /* ------------------------------------------------------------------------------------------- | |
| + Removes items from Context Menu | |
| Source : https://old.reddit.com/r/FirefoxCSS/comments/j0yc1q/context_menu_element_hiding/ | |
| Open Link in New Window -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuitem#context-openlink.context-menu-open-link | |
| Open Link in New Private Window -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuitem#context-openlinkprivate.context-menu-open-link | |
| #context-sep-open -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuseparator#context-sep-open | |
| #context-sep-selectall -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuseparator#context-sep-selectall | |
| Search DuckDuckGo (custom) for “n possibly use …” -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuitem#context-searchselect | |
| View Selection Source -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuitem#context-viewpartialsource-selection | |
| #inspect-separator -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuseparator#inspect-separator | |
| Source : https://github.com/Timvde/UserChrome-Tweaks/tree/master/context-menu | |
| Send Page to Device -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menu#context-sendpagetodevice.sync-ui-item | |
| #context-sep-sendpagetodevice -- NON-EXISTANT | |
| Send Link to Device -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menu#context-sendlinktodevice.sync-ui-item | |
| #context-sep-sendlinktodevice -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuseparator#context-sep-sendlinktodevice.sync-ui-item | |
| Source : https://old.reddit.com/r/FirefoxCSS/comments/j0yc1q/context_menu_element_hiding/ | |
| Move to New Window -- html#main-window body popupset#mainPopupSet menupopup#tabContextMenu menu#context_moveTabOptions menupopup#moveTabOptionsMenu menuitem#context_openTabInWindow | |
| #context_sendTabToDevice_separator -- NON-EXISTANT | |
| Send Tab to Device -- html#main-window body popupset#mainPopupSet menupopup#tabContextMenu menu#context_sendTabToDevice.sync-ui-item | |
| Source : https://old.reddit.com/r/firefox/comments/73pp7j/how_to_hide_open_link_in_new_container_tab_in/ | |
| Open Link in New Container Tab -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menu#context-openlinkinusercontext-menu.context-menu-open-link | |
| Source : https://www.userchrome.org/what-is-userchrome-css.html | |
| Email Image… -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuitem#context-sendimage | |
| Set Image as Desktop Background… -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuitem#context-setDesktopBackground | |
| Source : xypha - https://github.com/xypha/ | |
| Print Selection… -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuitem#context-print-selection | |
| Translate Selection to English -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuitem#context-translate-selection | |
| Take Screenshot -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuitem#context-take-screenshot | |
| remove double separators -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuseparator#context-sep-screenshots | |
| remove double separators -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuseparator#context-sep-sharing | |
| */ | |
| #context-openlink, #context-openlinkprivate, | |
| #context-sep-open, #context-sep-selectall, | |
| #context-searchselect, | |
| #context-viewpartialsource-selection, #inspect-separator, | |
| #context-sendpagetodevice, | |
| #context-sendlinktodevice, #context-sep-sendlinktodevice, | |
| #context_openTabInWindow, #context_sendTabToDevice, | |
| #context-openlinkinusercontext-menu, | |
| #context-sendimage, | |
| #context-sep-setbackground, #context-setDesktopBackground, | |
| #context-print-selection, #context-translate-selection, | |
| #context-take-screenshot, #context-sep-screenshots, | |
| #context-sep-sharing { | |
| display: none !important; | |
| } | |
| /* ------------------------------------------------------------------------------------------- | |
| + Remove "Copy Link" | |
| Source : https://old.reddit.com/r/FirefoxCSS/comments/180nivz/how_is_copy_link_without_site_tracking_referred/kadxu10/ | |
| Copy Link -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuitem#context-copylink | |
| Copy Clean Link -- html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuitem#context-stripOnShareLink | |
| */ | |
| #context-copylink { | |
| display: none !important; | |
| } | |
| /* no longer works since v135 -- label 'Copy Link Without Site Tracking' changed to 'Copy Clean Link' | |
| #context-copylink, #context-stripOnShareLink > .menu-text { | |
| display: none !important; | |
| } | |
| #context-stripOnShareLink::before { | |
| -moz-appearance: menuitemtext; | |
| display: flex; | |
| } | |
| #context-stripOnShareLink::before { | |
| content: "Copy Link-U"; | |
| } | |
| */ | |
| /* Didn't work | |
| Copy Without Site Tracking -- html#main-window body toolbox#navigator-toolbox toolbar#nav-bar.browser-toolbar hbox#nav-bar-customization-target.customization-target toolbaritem#urlbar-container.chromeclass-location hbox#urlbar hbox#urlbar-input-container moz-input-box.urlbar-input-box menupopup.textbox-contextmenu menuitem#strip-on-share | |
| #strip-on-share > .menu-text { | |
| display: none; | |
| } | |
| #strip-on-share { | |
| content: "Copy-N"; | |
| } | |
| */ | |
| /* ------------------------------------------------------------------------------------------- | |
| + Customize | |
| Source : xypha - https://github.com/xypha/ | |
| */ | |
| /* Remove bottom border below address bar - 2024.10.15 */ | |
| #navigator-toolbox { | |
| border-bottom: #1c1b22 0.01px solid !important; | |
| } | |
| /* top margin for bookmark bar - 2024.10.15 */ | |
| toolbarbutton.bookmark-item:not(.subviewbutton) { | |
| margin-top: 0 !important; | |
| } | |
| /* remove left padding on 1st tab - 2024.10.29 | |
| and increase right padding from 2px to 4px - 2024.11.24*/ | |
| .tabbrowser-tab { | |
| padding: 0 4px 0 0 !important; | |
| } | |
| /* change active tab background colour - 2024.10.29 */ | |
| .tabbrowser-tab:is([visuallyselected], [multiselected]) > .tab-stack > .tab-background { | |
| background: #2b2a33 !important; | |
| } | |
| /* remove space before first tab and after last tab when window is not maximised - 2024.12.14 */ | |
| .titlebar-spacer { | |
| display: none !important; | |
| } | |
| /* remove 'Email Video…' menu option - 2025.02.14 | |
| html#main-window body popupset#mainPopupSet menupopup#contentAreaContextMenu menuitem#context-sendvideo */ | |
| menuitem#context-sendvideo { | |
| display: none !important; | |
| } | |
| /* ------------------------------------------------------------------------------------------- | |
| + Tighten up drop-down/context/popup menu spacing (8 Sep 2021) | |
| Source : https://www.userchrome.org/firefox-89-styling-proton-ui.html | |
| * custom - 2px | |
| Last checked: 2024.10.15 | |
| */ | |
| menupopup:not(.in-menulist) > menuitem, | |
| menupopup:not(.in-menulist) > menu { | |
| padding-block: 2px !important; /* reduce to 3px, 2px, 1px or 0px as needed */ | |
| min-height: unset !important; /* v92.0 - for padding below 4px */ | |
| } | |
| :root { | |
| --arrowpanel-menuitem-padding: 4px 8px !important; | |
| } | |
| /* ------------------------------------------------------------------------------------------- | |
| + Proton Tabs Tweaks | |
| Source : https://www.userchrome.org/firefox-89-styling-proton-ui.html | |
| Tweak Options as of 12/10/2022; Generated Tue Sep 19 2023 21:52:48 GMT+0530 (India Standard Time) | |
| Last checked: 2024.10.15 | |
| */ | |
| /* Adjust tab corner shape, optionally remove space below tabs */ | |
| #tabbrowser-tabs { | |
| --user-tab-rounding: 6px; | |
| } | |
| .tab-background { | |
| border-radius: var(--user-tab-rounding) var(--user-tab-rounding) 0px 0px !important; /* Connected */ | |
| margin-block: 1px 0 !important; /* Connected */ | |
| } | |
| #scrollbutton-up, #scrollbutton-down { /* 6/10/2021 */ | |
| border-top-width: 1px !important; | |
| border-bottom-width: 0 !important; | |
| } | |
| /* 1/16/2022 Tone down the Fx96 tab border with add-on themes in certain fallback situations */ | |
| .tab-background:is([selected], [multiselected]):-moz-lwtheme { | |
| --lwt-tabs-border-color: rgba(0, 0, 0, 0.5) !important; | |
| border-bottom-color: transparent !important; | |
| } | |
| [brighttext="true"] .tab-background:is([selected], [multiselected]):-moz-lwtheme { | |
| --lwt-tabs-border-color: rgba(255, 255, 255, 0.5) !important; | |
| border-bottom-color: transparent !important; | |
| } | |
| /* Container color bar visibility */ | |
| .tabbrowser-tab[usercontextid] > .tab-stack > .tab-background > .tab-context-line { | |
| margin: 0px max(calc(var(--user-tab-rounding) - 3px), 0px) !important; | |
| } | |
| /* Override Normal Density height to Compact Density height only for tabs */ | |
| #TabsToolbar, #tabbrowser-tabs { | |
| --tab-min-height: 29px !important; | |
| } | |
| /* Tweak for covering a line at the bottom of the active tab on some themes 8/11/2021 */ | |
| #main-window[sizemode="normal"] #toolbar-menubar[autohide="true"] + #TabsToolbar, | |
| #main-window[sizemode="normal"] #toolbar-menubar[autohide="true"] + #TabsToolbar #tabbrowser-tabs { | |
| --tab-min-height: 30px !important; | |
| } | |
| #scrollbutton-up, | |
| #scrollbutton-down { | |
| border-top-width: 0 !important; | |
| border-bottom-width: 0 !important; | |
| } | |
| /* [Connected Tabs] Set a max height based on min-height plus margin-block: 1px 0 */ | |
| #TabsToolbar, #TabsToolbar > hbox, #TabsToolbar-customization-target, #tabbrowser-arrowscrollbox { | |
| max-height: calc(var(--tab-min-height) + 1px) !important; | |
| } | |
| /* [Connected Tabs] Adjust padding around icons on buttons to avoid crushed images */ | |
| #TabsToolbar-customization-target toolbarbutton > .toolbarbutton-icon, | |
| #TabsToolbar-customization-target .toolbarbutton-text, | |
| #TabsToolbar-customization-target .toolbarbutton-badge-stack, | |
| #scrollbutton-up,#scrollbutton-down { | |
| padding-top: 7px !important; | |
| padding-bottom: 6px !important; | |
| } | |
| /* [Connected Tabs] Make sure tab attention dot isn't too high - 10 Dec 2022 */ | |
| .tabbrowser-tab:is([image], [pinned]) > .tab-stack > .tab-content[attention]:not([selected="true"]), | |
| .tabbrowser-tab > .tab-stack > .tab-content[pinned][titlechanged]:not([selected="true"]), | |
| #firefox-view-button[attention], .webextension-browser-action[attention="true"] { | |
| background-position-y: bottom 2px !important; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment