aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2022-11-09 16:30:40 -0800
committerJohn MacFarlane <[email protected]>2022-11-09 17:03:12 -0800
commit334903bb9d7b7475666dcbb2c30b8d92339615a8 (patch)
treec47f1f0aaa0729a82760406ed53a5080a0d63ac9 /data
parentcb5e3ded121eda1fa768f6d80d7cecd49fd6ca39 (diff)
HTML template: remove default font size, line height...
...and font family in default inline css. Closes #8423 (see comments there for motivation). `mainfont`, `fontsize`, and `linestretch` can still be used as before; the only difference is that we no longer provide opinionated defaults. This commit also adds a `maxwidth` variable that sets `max-width`; if not set, 36em is used as a default.
Diffstat (limited to 'data')
-rw-r--r--data/templates/styles.html16
1 files changed, 11 insertions, 5 deletions
diff --git a/data/templates/styles.html b/data/templates/styles.html
index c21f1acab..bee9911d3 100644
--- a/data/templates/styles.html
+++ b/data/templates/styles.html
@@ -1,14 +1,20 @@
$if(document-css)$
html {
- line-height: $if(linestretch)$$linestretch$$else$1.5$endif$;
- font-family: $if(mainfont)$$mainfont$$else$Georgia, serif$endif$;
- font-size: $if(fontsize)$$fontsize$$else$20px$endif$;
+$if(mainfont)$
+ font-family: $mainfont$;
+$endif$
+$if(fontsize)$
+ font-size: $fontsize$;
+$endif$
+$if(linestretch)$
+ line-height: $linestretch$;
+$endif$
color: $if(fontcolor)$$fontcolor$$else$#1a1a1a$endif$;
background-color: $if(backgroundcolor)$$backgroundcolor$$else$#fdfdfd$endif$;
}
body {
margin: 0 auto;
- max-width: 36em;
+ max-width: $if(maxwidth)$$maxwidth$$else$36em$endif$;
padding-left: $if(margin-left)$$margin-left$$else$50px$endif$;
padding-right: $if(margin-right)$$margin-right$$else$50px$endif$;
padding-top: $if(margin-top)$$margin-top$$else$50px$endif$;
@@ -21,7 +27,7 @@ body {
@media (max-width: 600px) {
body {
font-size: 0.9em;
- padding: 1em;
+ padding: 12px;
}
h1 {
font-size: 1.8em;