Skip to content

Instantly share code, notes, and snippets.

@threethan
Last active March 3, 2023 00:31
Show Gist options
  • Save threethan/e4f0a7c50252eb22fad57b2a52fb1d33 to your computer and use it in GitHub Desktop.
Save threethan/e4f0a7c50252eb22fad57b2a52fb1d33 to your computer and use it in GitHub Desktop.
Windows 11 Styled Right-Click Menu for FireFox (userChrome tweak)
/*
* Makes the right-click menu in FireFox look like windows 11's native right click menus
*
* Add as your userChrome.css or append to an existing one
* https://www.reddit.com/r/firefox/wiki/userchrome/
*
* Created for Firefox 111 but should work with future versions
*/
menupopup {
--panel-background: #f6f6f6F9 !important;
--panel-border-color: #DDD !important;
--panel-shadow: 0px 7px 20px 3px rgba(0,0,0,0.07), 0px 9px 8px -7px rgba(0,0,0,0.15) !important;
--panel-border-radius: 8px !important;
--panel-shadow-margin: 25px !important;
/* border-bottom-right-radius: 1px; */
/* transition: 1s; */
opacity: 0;
margin-top: -25px !important;
margin-left: -25px !important;
--panel-padding: 5px 0 !important;
}
menupopup menuseparator {
border-top-color: var(--panel-border-color) !important;
margin: 6px 6px !important;
}
@media (prefers-color-scheme: dark) {
menupopup {
--panel-background: #2e2f30FC !important;
--panel-border-color: #FFFFFF10 !important;
}
}
menupopup:not(hidden) {
opacity: 1;
}
menupopup menuitem, menupopup menu {
border-radius: 4px !important;
margin: 1px 6px;
transition: 0.07s;
}
menupopup menuitem[_moz-menuactive=true], menupopup menu[_moz-menuactive=true] {
background-color: var(--panel-border-color) !important;
}
menupopup #context-navigation menuitem {
margin: 0 6px !important;
padding: 0 !important;
}
menupopup #context-navigation {
--menuitem-min-width: inherit !important;
padding-bottom: 0 !important;
}
menupopup menuitem image {
/* border-radius: 4px !important; */
background-color: transparent !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment