mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 17:20:47 +08:00
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.
This commit is contained in:
@@ -2641,6 +2641,9 @@ ODT or pptx.
|
||||
: sets the CSS `line-height` property on the `html` element,
|
||||
which is preferred to be unitless.
|
||||
|
||||
`maxwidth`
|
||||
: sets the CSS `max-width` property (default is 32em).
|
||||
|
||||
`backgroundcolor`
|
||||
: sets the CSS `background-color` property on the `html` element.
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
+1
-4
@@ -7,9 +7,6 @@
|
||||
<title>lhs-test</title>
|
||||
<style>
|
||||
html {
|
||||
line-height: 1.5;
|
||||
font-family: Georgia, serif;
|
||||
font-size: 20px;
|
||||
color: #1a1a1a;
|
||||
background-color: #fdfdfd;
|
||||
}
|
||||
@@ -28,7 +25,7 @@
|
||||
@media (max-width: 600px) {
|
||||
body {
|
||||
font-size: 0.9em;
|
||||
padding: 1em;
|
||||
padding: 12px;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.8em;
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
<title>lhs-test</title>
|
||||
<style>
|
||||
html {
|
||||
line-height: 1.5;
|
||||
font-family: Georgia, serif;
|
||||
font-size: 20px;
|
||||
color: #1a1a1a;
|
||||
background-color: #fdfdfd;
|
||||
}
|
||||
@@ -28,7 +25,7 @@
|
||||
@media (max-width: 600px) {
|
||||
body {
|
||||
font-size: 0.9em;
|
||||
padding: 1em;
|
||||
padding: 12px;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.8em;
|
||||
|
||||
+1
-4
@@ -10,9 +10,6 @@
|
||||
<title>Pandoc Test Suite</title>
|
||||
<style type="text/css">
|
||||
html {
|
||||
line-height: 1.5;
|
||||
font-family: Georgia, serif;
|
||||
font-size: 20px;
|
||||
color: #1a1a1a;
|
||||
background-color: #fdfdfd;
|
||||
}
|
||||
@@ -31,7 +28,7 @@
|
||||
@media (max-width: 600px) {
|
||||
body {
|
||||
font-size: 0.9em;
|
||||
padding: 1em;
|
||||
padding: 12px;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.8em;
|
||||
|
||||
+1
-4
@@ -10,9 +10,6 @@
|
||||
<title>Pandoc Test Suite</title>
|
||||
<style>
|
||||
html {
|
||||
line-height: 1.5;
|
||||
font-family: Georgia, serif;
|
||||
font-size: 20px;
|
||||
color: #1a1a1a;
|
||||
background-color: #fdfdfd;
|
||||
}
|
||||
@@ -31,7 +28,7 @@
|
||||
@media (max-width: 600px) {
|
||||
body {
|
||||
font-size: 0.9em;
|
||||
padding: 1em;
|
||||
padding: 12px;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.8em;
|
||||
|
||||
Reference in New Issue
Block a user