Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/format/html/format-html-scss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ function pandocVariablesToThemeDefaults(
add(explicitVars, "font-family-base", metadata["mainfont"], asCssFont);
add(explicitVars, "font-family-code", metadata["monofont"], asCssFont);
add(explicitVars, "mono-background-color", metadata["monobackgroundcolor"]);
add(explicitVars, "mono-foreground-color", metadata["monoforegroundcolor"]);

// Deal with sizes
const explicitSizes = [
Expand Down
2 changes: 1 addition & 1 deletion src/format/reveal/format-reveal-theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ function pandocVariablesToRevealDefaults(
asCssNumber,
);
add(explicitVars, "code-block-bg", metadata["monobackgroundcolor"]);
add(explicitVars, "code-block-color", metadata["monoforegroundcolor"]);

// Non-pandoc options from front matter
add(explicitVars, "code-block-height", metadata[kCodeBlockHeight]);
return explicitVars;
Expand Down
29 changes: 11 additions & 18 deletions src/resources/formats/html/bootstrap/_bootstrap-rules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,16 @@ pre {

// Maps the pandoc 'monobackgroundcolor' to bootstrap
// Note this only targets code outside of sourceCode blocks
@if variable-exists(mono-background-color) {
p code:not(.sourceCode),
li code:not(.sourceCode),
kbd,
pre:not(.sourceCode),
samp {
background-color: $mono-background-color;
padding: 0.2em;
}
}

p pre code:not(.sourceCode),
li pre code:not(.sourceCode),
Expand All @@ -927,38 +937,21 @@ pre code:not(.sourceCode) {
}

// Default padding if background is set
h1 code:not(.sourceCode),
h2 code:not(.sourceCode),
h3 code:not(.sourceCode),
h4 code:not(.sourceCode),
h5 code:not(.sourceCode),
h6 code:not(.sourceCode),
p code:not(.sourceCode),
li code:not(.sourceCode),
td code:not(.sourceCode),
kbd,
pre:not(.sourceCode),
samp {
td code:not(.sourceCode) {
@if variable-exists(mono-background-color) {
background-color: $mono-background-color;
} @else if variable-exists(code-bg) {
background-color: $code-bg;
}

@if variable-exists(mono-foreground-color) {
color: $mono-foreground-color;
} @else if variable-exists(code-color) {
color: $code-color;
}

@if variable-exists(code-padding) {
padding: $code-padding;
} @else if variable-exists(code-bg) {
padding: 0.2em;
} @else if variable-exists(mono-background-color) {
padding: 0.2em;
} @else if variable-exists(mono-foreground-color) {
padding: 0.2em;
}
}

Expand Down
6 changes: 0 additions & 6 deletions src/resources/formats/html/pandoc/html.styles
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ code {
$if(monobackgroundcolor)$
background-color: $monobackgroundcolor$;
padding: .2em .4em;
$endif$
$if(monoforegroundcolor)$
color: $monoforegroundcolor$;
$endif$
font-size: 85%;
margin: 0;
Expand All @@ -120,9 +117,6 @@ pre {
$if(monobackgroundcolor)$
background-color: $monobackgroundcolor$;
padding: 1em;
$endif$
$if(monoforegroundcolor)$
color: $monoforegroundcolor$;
$endif$
overflow: auto;
}
Expand Down
6 changes: 0 additions & 6 deletions src/resources/formats/html/pandoc/styles.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,6 @@
$if(monobackgroundcolor)$
background-color: $monobackgroundcolor$;
padding: .2em .4em;
$endif$
$if(monoforegroundcolor)$
color: $monoforegroundcolor$;
$endif$
font-size: 85%;
margin: 0;
Expand All @@ -132,9 +129,6 @@
$if(monobackgroundcolor)$
background-color: $monobackgroundcolor$;
padding: 1em;
$endif$
$if(monoforegroundcolor)$
color: $monoforegroundcolor$;
$endif$
overflow: auto;
}
Expand Down
6 changes: 0 additions & 6 deletions src/resources/schema/document-colors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@
formats: [html, html4, html5, slidy, slideous, s5, dzslides]
description: Sets the CSS `background-color` property on code elements and adds extra padding.

- name: monoforegroundcolor
schema: string
tags:
formats: [html, html4, html5, slidy, slideous, s5, dzslides]
description: Sets the CSS `color` property on code elements and adds extra padding.

- name: backgroundcolor
schema: string
tags:
Expand Down
Loading