about summary refs log tree commit homepage
path: root/lib/PublicInbox/UserContent.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-08-16 22:42:45 +0000
committerEric Wong <e@80x24.org>2021-08-17 00:22:11 +0000
commit9827b6c6f9859b4c136182fbfffdf3fc73a1014d (patch)
treebf6a705e9532c126e0a7c423a723f1de46ba8f70 /lib/PublicInbox/UserContent.pm
parent86df4acd140d61ab2f82e8c17e3118865f867c9a (diff)
downloadpublic-inbox-9827b6c6f9859b4c136182fbfffdf3fc73a1014d.tar.gz
Fixes: 86df4acd140d61ab ("Duplicate base css definitions in stylesheets")
Diffstat (limited to 'lib/PublicInbox/UserContent.pm')
-rw-r--r--lib/PublicInbox/UserContent.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/PublicInbox/UserContent.pm b/lib/PublicInbox/UserContent.pm
index b63d0617..f28610f7 100644
--- a/lib/PublicInbox/UserContent.pm
+++ b/lib/PublicInbox/UserContent.pm
@@ -17,13 +17,18 @@ sub CSS () {
          * 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:link { 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 */
@@ -101,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 $!;