X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FUserContent.pm;h=f28610f7f9b25833943f790c8e81bb13e7d9e0aa;hb=23af251dd607c4e75ab1e68063f2c885c48cc035;hp=f01160d451c436e0d41491bd91fffe17346b2c65;hpb=8548f6a4aee0b92adbc298183b551ff3e9ac4281;p=public-inbox.git
diff --git a/lib/PublicInbox/UserContent.pm b/lib/PublicInbox/UserContent.pm
index f01160d4..f28610f7 100644
--- a/lib/PublicInbox/UserContent.pm
+++ b/lib/PublicInbox/UserContent.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 all contributors
+# Copyright (C) 2019-2021 all contributors
# License: AGPL-3.0+
# Self-updating module containing a sample CSS for client-side
@@ -11,18 +11,24 @@ use warnings;
sub CSS () {
<<'_'
/*
+ * CC0-1.0
* Dark color scheme using 216 web-safe colors, inspired
* somewhat by the default color scheme in mutt.
* It reduces eyestrain for me, and energy usage for all:
* https://en.wikipedia.org/wiki/Light-on-dark_color_scheme
*/
- * { background:#000 !important; color:#ccc !important }
+ * { font-size: 100% !important;
+ font-family: monospace !important;
+ background:#000 !important;
+ color:#ccc !important }
+ pre { white-space: pre-wrap !important }
/*
* Underlined links add visual noise which make them hard-to-read.
* Use colors to make them stand out, instead.
*/
- a { color:#69f !important; text-decoration:none !important }
+ a:link { color:#69f !important;
+ text-decoration:none !important }
a:visited { color:#96f !important }
/* quoted text in emails gets a different color */
@@ -100,6 +106,7 @@ if (scalar(@ARGV) == 1 && -r __FILE__) {
open my $rw, '+<', __FILE__ or die $!;
my $out = do { local $/; <$rw> } or die $!;
+ $css =~ s/; /;\n\t\t/g;
$out =~ s/^sub CSS.*^_\n\}/sub CSS () {\n\t<<'_'\n${css}_\n}/sm;
seek $rw, 0, 0;
print $rw $out or die $!;