1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-01 00:39:45 +01:00

firefox: support user content CSS

The `userContent.css` file is similar to `userChrome.css`, it's a CSS
file that you can use to change the way web sites and e-mails look.

See http://kb.mozillazine.org/index.php?title=UserContent.css

PR #1079
This commit is contained in:
Joshua Fern 2020-03-09 06:39:37 +00:00 committed by Robert Helgesson
parent 5c1e7349bb
commit 2681568f2b
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -137,7 +137,7 @@ in
userChrome = mkOption {
type = types.lines;
default = "";
description = "Custom Firefox CSS.";
description = "Custom Firefox user chrome CSS.";
example = ''
/* Hide tab bar in FF Quantum */
@-moz-document url("chrome://browser/content/browser.xul") {
@ -153,6 +153,16 @@ in
'';
};
userContent = mkOption {
type = types.lines;
default = "";
description = "Custom Firefox user content CSS.";
example = ''
/* Hide scrollbar in FF Quantum */
*{scrollbar-width:none !important}
'';
};
path = mkOption {
type = types.str;
default = name;
@ -295,6 +305,11 @@ in
text = profile.userChrome;
};
"${profilesPath}/${profile.path}/chrome/userContent.css" =
mkIf (profile.userContent != "") {
text = profile.userContent;
};
"${profilesPath}/${profile.path}/user.js" =
mkIf (profile.settings != {} || profile.extraConfig != "") {
text = mkUserJs profile.settings profile.extraConfig;