diff options
author | aszlig <aszlig@nix.build> | 2023-07-14 00:31:10 +0200 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2023-07-14 00:31:10 +0200 |
commit | e868bfeca5501c7c02f1fc1013ea6cc7e79af043 (patch) | |
tree | 4ae3b099a51723e32a3c6c2fa43c02fb3340ce68 /pkgs/aszlig/firefox | |
parent | 8a5bc2f528716119c125e41a16fba7a2de5c2b0b (diff) |
firefox: Make FOUC less annoying
Flash of unstyled content[1] is a common issue in browsers and happens whenever transitioning to a page without the full styles being loaded. For the most part, Firefox does a good job preventing FOUC, but in some occasions the default colors still show up. Since I do prefer a dark color scheme anyway, let's actually make sure that the default colors represent a dark color scheme. The reason why I picked the dark colors from startpage.com is purely because it was the next best to pick some colors from, rather than personal preference. [1]: https://en.wikipedia.org/wiki/Flash_of_unstyled_content Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/aszlig/firefox')
-rw-r--r-- | pkgs/aszlig/firefox/default.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/aszlig/firefox/default.nix b/pkgs/aszlig/firefox/default.nix index 1c49fc6a..3ae44e4a 100644 --- a/pkgs/aszlig/firefox/default.nix +++ b/pkgs/aszlig/firefox/default.nix @@ -77,6 +77,13 @@ in wrapFirefox firefoxNoSigning { lockPref('privacy.trackingprotection.socialtracking.enabled', true); lockPref('reader.color_scheme', 'dark'); + // Make flash of unstyled content less annoying by defaulting to + // Startpage's dark color scheme. + lockPref('browser.display.background_color', '#171B25'); + lockPref('browser.display.foreground_color', '#EBECF7'); + lockPref('browser.anchor_color', '#A7B1FC'); + lockPref('browser.visited_color', '#AD71BC'); + pref('browser.uiCustomization.state', ${jsString (builtins.toJSON { placements = { widget-overflow-fixed-list = []; |