Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Right-click context-menu appearence #507

Open
Ghis1964 opened this issue Feb 7, 2025 · 1 comment
Open

Right-click context-menu appearence #507

Ghis1964 opened this issue Feb 7, 2025 · 1 comment

Comments

@Ghis1964
Copy link

Ghis1964 commented Feb 7, 2025

Not an issue here I hope. Maybe it's only on my side.

How do I go about making the right-click context-menu the same transparency or similar to the drop-down menu (app-menu/bookmark-menu/etc)?

I've search the most likely css files but can't find the element. Even tried to guess what it would be, ex: #context-menupopup for one, to no avail.

@MrOtherGuy
Copy link
Owner

This should get you started:

menupopup{
  --panel-background: var(--arrowpanel-background) !important;
  --panel-color: var(--arrowpanel-color) !important;
}
menupopup menu:where([_moz-menuactive]:not([disabled="true"])),
menupopup menuitem:where([_moz-menuactive]:not([disabled="true"])){
  color: inherit !important;
  background-color: var(--panel-item-hover-bgcolor) !important;
}

Thing is, there isn't just one right-click context menu, but several. What menupopup is shown just depends on what you happened to right click on. That's why I'm using a generic menupopup selector. A side-effect is that other menupopups will now also be styled with this, not just right-click menus - this includes things like menus from menubar.

Also, the styling of context-menus is very much platform specific. The above should work on Windows, but it may not work on Linux. On mac it will almost certainly not work because there Firefox uses native context menus which cannot be styled with CSS - I think that might be the case on some Linux systems as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants