@@ -919,6 +919,16 @@ pre {
919919
920920// Maps the pandoc 'monobackgroundcolor' to bootstrap
921921// Note this only targets code outside of sourceCode blocks
922+ @if variable-exists (mono-background-color ) {
923+ p code :not (.sourceCode ),
924+ li code :not (.sourceCode ),
925+ kbd ,
926+ pre :not (.sourceCode ),
927+ samp {
928+ background-color : $mono-background-color ;
929+ padding : 0.2em ;
930+ }
931+ }
922932
923933p pre code :not (.sourceCode ),
924934li pre code :not (.sourceCode ),
@@ -927,38 +937,21 @@ pre code:not(.sourceCode) {
927937}
928938
929939// Default padding if background is set
930- h1 code :not (.sourceCode ),
931- h2 code :not (.sourceCode ),
932- h3 code :not (.sourceCode ),
933- h4 code :not (.sourceCode ),
934- h5 code :not (.sourceCode ),
935- h6 code :not (.sourceCode ),
936940p code :not (.sourceCode ),
937941li code :not (.sourceCode ),
938- td code :not (.sourceCode ),
939- kbd ,
940- pre :not (.sourceCode ),
941- samp {
942+ td code :not (.sourceCode ) {
942943 @if variable-exists (mono-background-color ) {
943944 background-color : $mono-background-color ;
944945 } @else if variable-exists (code-bg ) {
945946 background-color : $code-bg ;
946947 }
947948
948- @if variable-exists (mono-foreground-color ) {
949- color : $mono-foreground-color ;
950- } @else if variable-exists (code-color ) {
951- color : $code-color ;
952- }
953-
954949 @if variable-exists (code-padding ) {
955950 padding : $code-padding ;
956951 } @else if variable-exists (code-bg ) {
957952 padding : 0.2em ;
958953 } @else if variable-exists (mono-background-color ) {
959954 padding : 0.2em ;
960- } @else if variable-exists (mono-foreground-color ) {
961- padding : 0.2em ;
962955 }
963956}
964957
0 commit comments