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.
This commit is contained in:
John MacFarlane 2020-11-01 14:29:03 -08:00
parent 95d8713633
commit ea45837372
6 changed files with 9 additions and 20 deletions

View file

@ -2215,7 +2215,8 @@ ODT or pptx.
: sets the CSS `font-family` property on `code` elements. : sets the CSS `font-family` property on `code` elements.
`monobackgroundcolor` `monobackgroundcolor`
: sets the CSS `background-color` property on `code` elements. : sets the CSS `background-color` property on `code` elements
and adds extra padding.
`linestretch` `linestretch`
: sets the CSS `line-height` property on the `html` element, : sets the CSS `line-height` property on the `html` element,

View file

@ -74,16 +74,20 @@ blockquote {
} }
code { code {
font-family: $if(monofont)$$monofont$$else$Menlo, Monaco, 'Lucida Console', Consolas, monospace$endif$; font-family: $if(monofont)$$monofont$$else$Menlo, Monaco, 'Lucida Console', Consolas, monospace$endif$;
background-color: $if(monobackgroundcolor)$$monobackgroundcolor$$else$#f0f0f0$endif$; $if(monobackgroundcolor)$
background-color: $monobackgroundcolor$;
padding: .2em .4em;
$endif$
font-size: 85%; font-size: 85%;
margin: 0; margin: 0;
padding: .2em .4em;
} }
pre { pre {
margin: 1.7em 0; margin: 1.7em 0;
line-height: 1.5em; line-height: 1.5em;
$if(monobackgroundcolor)$
background-color: $monobackgroundcolor$;
padding: 1em; padding: 1em;
background-color: $if(monobackgroundcolor)$$monobackgroundcolor$$else$#f0f0f0$endif$; $endif$
overflow: auto; overflow: auto;
} }
pre code { pre code {

View file

@ -81,16 +81,12 @@
} }
code { code {
font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace; font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
background-color: #f0f0f0;
font-size: 85%; font-size: 85%;
margin: 0; margin: 0;
padding: .2em .4em;
} }
pre { pre {
margin: 1.7em 0; margin: 1.7em 0;
line-height: 1.5em; line-height: 1.5em;
padding: 1em;
background-color: #f0f0f0;
overflow: auto; overflow: auto;
} }
pre code { pre code {

View file

@ -81,16 +81,12 @@
} }
code { code {
font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace; font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
background-color: #f0f0f0;
font-size: 85%; font-size: 85%;
margin: 0; margin: 0;
padding: .2em .4em;
} }
pre { pre {
margin: 1.7em 0; margin: 1.7em 0;
line-height: 1.5em; line-height: 1.5em;
padding: 1em;
background-color: #f0f0f0;
overflow: auto; overflow: auto;
} }
pre code { pre code {

View file

@ -84,16 +84,12 @@
} }
code { code {
font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace; font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
background-color: #f0f0f0;
font-size: 85%; font-size: 85%;
margin: 0; margin: 0;
padding: .2em .4em;
} }
pre { pre {
margin: 1.7em 0; margin: 1.7em 0;
line-height: 1.5em; line-height: 1.5em;
padding: 1em;
background-color: #f0f0f0;
overflow: auto; overflow: auto;
} }
pre code { pre code {

View file

@ -84,16 +84,12 @@
} }
code { code {
font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace; font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
background-color: #f0f0f0;
font-size: 85%; font-size: 85%;
margin: 0; margin: 0;
padding: .2em .4em;
} }
pre { pre {
margin: 1.7em 0; margin: 1.7em 0;
line-height: 1.5em; line-height: 1.5em;
padding: 1em;
background-color: #f0f0f0;
overflow: auto; overflow: auto;
} }
pre code { pre code {