Open karlhorky opened 1 week ago
Use pre:has(> code.language-txt)
selector to manually apply background
and color
matching your theme:
/**
* Apply dark-plus background and color for plain text code blocks
*
* TODO: Remove if @shikijs/rehype is updated to do this out of the box:
* - https://github.com/shikijs/shiki/issues/805
*
*/
pre:has(> code.language-txt) {
@apply bg-[#1E1E1E] text-[#D4D4D4];
}
Validations
Describe the bug
Using
@shikijs/rehype
, atext
/txt
/plain
code block will appear withoutbackground
orcolor
from the theme specified:next.config.ts
MDX: