Skip to content

zen-browser: fix selection colors after Firefox 154 - #2484

Open
saadndm wants to merge 1 commit into
nix-community:masterfrom
saadndm:fix/selection-colors
Open

zen-browser: fix selection colors after Firefox 154#2484
saadndm wants to merge 1 commit into
nix-community:masterfrom
saadndm:fix/selection-colors

Conversation

@saadndm

@saadndm saadndm commented Aug 20, 2026

Copy link
Copy Markdown
Member

The text selection theming introduced in #2184 and the urlbar text selection highlight no longer works with Firefox 154 after mozilla-firefox/firefox@fe629a3. It now ignores ::selection from user stylesheets, and instead falls back to ui.highlight and ui.highlighttext preferences.

This PR sets those ui.highlight and ui.highlighttext preferences to base0D and base00.

  • These match the colors previously used for URL bar text selection
  • zen-browser: add text selection theming #2184 used base02 and base05 for webpage selection. After Firefox 154 we can no longer keep webpage selection colors separate from the browser UI selection, and (personally) this new accent pair has better contrast in most cases.
  • The existing ::selection rule is still needed because it overrides selection color defined by websites, but changed it to use base0D and base00 for consistency.
  • Removed the URL bar selection rule which is not needed anymore
Existing style before 154 Existing style after 154 This PR after 154
image image image

Note: I did not update the testbed's zen-browser flake because it requires ffmpeg_9 which is not in the pinned nixpkgs version.

@stylix-automation stylix-automation Bot added topic: home-manager Home Manager target topic: modules /modules/ subsystem labels Aug 20, 2026
@stylix-automation
stylix-automation Bot requested a review from MrSom3body August 20, 2026 21:44

@MrSom3body MrSom3body left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@trueNAHO trueNAHO left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change itself looks good, except for minor things. Thanks for the detailed explanation.

I did not update the testbed's zen-browser flake because it requires ffmpeg_9 which is not in the pinned nixpkgs version.

Unless this causes non-trivial and unrelated issues, consider updating both zen-browser and nixpkgs inputs.

Comment on lines +71 to +72
"ui.highlight" = "#${colors.base0D}";
"ui.highlighttext" = "#${colors.base00}";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use the withHashtag variant here? Although /modules/zen-browser/userChrome.nix does not use it either, it might be good to keep at least this file pristine. Polishing /modules/zen-browser/userChrome.nix is out of the scope of this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: home-manager Home Manager target topic: modules /modules/ subsystem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants