Skip to content

Context menu background depends on --lwt-accent-color and conflicts with Dark Reader #74

@vanloc0301

Description

@vanloc0301

Problem

When using Shimmer together with Dark Reader with Catppuccin color, the Firefox context menu background inherits --lwt-accent-color.

Image

Dark Reader dynamically changes --lwt-accent-color, which causes the context menu
background to change unexpectedly (gray / inconsistent colors).

This only happens when Dark Reader is enabled.
Without Dark Reader, the current behavior is fine. So this theme is working perfect.

Root cause

In userChrome.css, the menu background is defined as:

.menupopup-arrowscrollbox {
  background: var(--lwt-accent-color, var(--panel-background)) !important;
}

=> change to:
background: var(--panel-background) !important;

and add this code at final userChrome.css:

menupopup menuitem[_moz-menuactive="true"],
menupopup menu[_moz-menuactive="true"] {
  background-color: color-mix(
    in srgb,
    var(--panel-background) 85%,
    white 15%
  ) !important;
  border-radius: 6px !important;
}
menupopup menuitem[disabled="true"][_moz-menuactive="true"],
menupopup menuitem[aria-disabled="true"][_moz-menuactive="true"],
menupopup menu[disabled="true"][_moz-menuactive="true"],
menupopup menu[aria-disabled="true"][_moz-menuactive="true"] {
  background-color: transparent !important;
}
menupopup menuitem,
menupopup menu {
  padding-block: 6px !important;
}

I using ChatGPT to ask and edit code, I don't know the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions