]> Sergey Matveev's repositories - public-inbox.git/commitdiff
hval: force monospace for <form> elements, too
authorEric Wong <e@80x24.org>
Sat, 19 Jan 2019 02:10:09 +0000 (02:10 +0000)
committerEric Wong <e@80x24.org>
Sat, 19 Jan 2019 03:34:54 +0000 (03:34 +0000)
Same reasoning as commit 7b7885fc3be2719c068c0a2fc860d53f17a1d933,
because GUI browsers have a tendency to use a different
font-family (and thus different size) as the rest of the page.

lib/PublicInbox/Hval.pm

index ccfa324220ff5be50204f52056e8a45ceb9fd26c..a120a291bd4d85c1e37ce4c1b549a7cdd2d948eb 100644 (file)
@@ -18,8 +18,12 @@ our @EXPORT_OK = qw/ascii_html obfuscate_addrs to_filename/;
 # browsers (tested both Firefox and surf (webkit)) uses a larger font
 # for the Search <form> element than the rest of the page.  Font size
 # uniformity is important to people who rely on gigantic fonts.
+# Finally, we use monospace to ensure the Search field and button
+# has the same size and spacing as everything else which is
+# <pre>-formatted anyways.
 use constant STYLE =>
-       '<style>pre{white-space:pre-wrap}*{font-size:100%}</style>';
+       '<style>pre{white-space:pre-wrap}' .
+       '*{font-size:100%;font-family:monospace}</style>';
 
 my $enc_ascii = find_encoding('us-ascii');