I had the same issue with the white background on the text and it was caused by the theme I was using setting the background colour on code blocks like this:
.theme-light code[class*="language-"], .theme-light pre[class*="language-"],
.theme-dark code[class*="language-"], .theme-dark pre[class*="language-"] {
white-space: pre-wrap;
background-color: var(--code-block-background);
margin-bottom: 3em;
}
You could just remove the “background-color” line from that block but that made all my code block have grey backgrounds which I didn’t like.
Instead, try using the following css:
.app-container pre[class*="language-note-"] {
border: 1px solid;
}
/* Make the first line of note bold */
*[class*="language-note"]::first-line {
font-weight: bold;
}
.app-container pre[class*="language-note-"] code[class*="language-note-"] {
color: black;
white-space: pre-wrap;
font-family: var(--font-family-preview);
font-size: var(--font-size-normal);
}
.app-container pre[class*="language-note-danger"], code[class*="language-note-danger"] {
border-color: #bb0101;
background-color: #f3bcbc !important;
}
.app-container pre.language-note-info, code[class*="language-note-info"] {
border-color: #3c78b5;
background-color: #d8e4f1 !important;
}
.app-container pre.language-note-warn, code[class*="language-note-warn"] {
border-color: #f0c000;
background-color: #ffffce !important;
}
.app-container pre.language-note-success, code[class*="language-note-success"] {
border-color: #009900;
background-color: #ddffdd !important;
}
.app-container pre.language-note-notice, code[class*="language-note-notice"] {
border-color: #cccccc;
background-color: #f3f3f3 !important;
}