git.iko.soy/typeable/pandoc
on master help sign in
Default CSS: avoid padding and color if monobackgroundcolor not given.

This makes the default more austere, while putting the padded, colored code elements within easy reach.

commitea458373726e7e3424617160aafcb3f7eacfd4e7 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 1 Nov 2020, 14:29 (6 years ago) parent95d8713
6 files changed+9−20
MANUAL.txt+2−1 data/templates/styles.html+7−3 test/lhs-test.html−4 test/lhs-test.html+lhs−4 test/writer.html4−4 test/writer.html5−4
MANUAL.txt+2−1
@@ -2215,7 +2215,8 @@ ODT or pptx.
22152215: sets the CSS `font-family` property on `code` elements.
22162216
22172217`monobackgroundcolor`
2218−: sets the CSS `background-color` property on `code` elements.
2218+: sets the CSS `background-color` property on `code` elements
2219+ and adds extra padding.
22192220
22202221`linestretch`
22212222: sets the CSS `line-height` property on the `html` element,
data/templates/styles.html+7−3
@@ -74,16 +74,20 @@ blockquote {
7474}
7575code {
7676 font-family: $if(monofont)$$monofont$$else$Menlo, Monaco, 'Lucida Console', Consolas, monospace$endif$;
77− background-color: $if(monobackgroundcolor)$$monobackgroundcolor$$else$#f0f0f0$endif$;
77+$if(monobackgroundcolor)$
78+ background-color: $monobackgroundcolor$;
79+ padding: .2em .4em;
80+$endif$
7881 font-size: 85%;
7982 margin: 0;
80− padding: .2em .4em;
8183}
8284pre {
8385 margin: 1.7em 0;
8486 line-height: 1.5em;
87+$if(monobackgroundcolor)$
88+ background-color: $monobackgroundcolor$;
8589 padding: 1em;
86− background-color: $if(monobackgroundcolor)$$monobackgroundcolor$$else$#f0f0f0$endif$;
90+$endif$
8791 overflow: auto;
8892}
8993pre code {
test/lhs-test.html−4
@@ -81,16 +81,12 @@
8181 }
8282 code {
8383 font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
84− background-color: #f0f0f0;
8584 font-size: 85%;
8685 margin: 0;
87− padding: .2em .4em;
8886 }
8987 pre {
9088 margin: 1.7em 0;
9189 line-height: 1.5em;
92− padding: 1em;
93− background-color: #f0f0f0;
9490 overflow: auto;
9591 }
9692 pre code {
test/lhs-test.html+lhs−4
@@ -81,16 +81,12 @@
8181 }
8282 code {
8383 font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
84− background-color: #f0f0f0;
8584 font-size: 85%;
8685 margin: 0;
87− padding: .2em .4em;
8886 }
8987 pre {
9088 margin: 1.7em 0;
9189 line-height: 1.5em;
92− padding: 1em;
93− background-color: #f0f0f0;
9490 overflow: auto;
9591 }
9692 pre code {
test/writer.html4−4
@@ -84,16 +84,12 @@
8484 }
8585 code {
8686 font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
87− background-color: #f0f0f0;
8887 font-size: 85%;
8988 margin: 0;
90− padding: .2em .4em;
9189 }
9290 pre {
9391 margin: 1.7em 0;
9492 line-height: 1.5em;
95− padding: 1em;
96− background-color: #f0f0f0;
9793 overflow: auto;
9894 }
9995 pre code {
test/writer.html5−4
@@ -84,16 +84,12 @@
8484 }
8585 code {
8686 font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
87− background-color: #f0f0f0;
8887 font-size: 85%;
8988 margin: 0;
90− padding: .2em .4em;
9189 }
9290 pre {
9391 margin: 1.7em 0;
9492 line-height: 1.5em;
95− padding: 1em;
96− background-color: #f0f0f0;
9793 overflow: auto;
9894 }
9995 pre code {