You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Reproduction
https://github.com/karlhorky/repro-shikijs-rehype-text-theme-styles-not-visible
Contributes
The text was updated successfully, but these errors were encountered: