feat(rehype-pretty-code): add support for multiple predefined themes (dark and light modes)

This commit is contained in:
cfngc4594 2025-03-07 11:31:40 +08:00
parent 56507f0362
commit 58a25b8a9c

View File

@ -114,3 +114,17 @@
padding: 15px; padding: 15px;
} }
} }
code[data-theme*=" "],
code[data-theme*=" "] span {
color: var(--shiki-light);
background-color: var(--shiki-light-bg);
}
@media (prefers-color-scheme: dark) {
code[data-theme*=" "],
code[data-theme*=" "] span {
color: var(--shiki-dark);
background-color: var(--shiki-dark-bg);
}
}