style(mdx): update code highlighting styles for dark mode

This commit is contained in:
cfngc4594 2025-03-10 14:09:11 +08:00
parent 9ebd961efe
commit 13fd49fd18

View File

@ -21,13 +21,23 @@
}
[data-rehype-pretty-code-figure] [data-highlighted-line] {
background: rgba(219, 234, 254, 0.5);
@apply border-l-blue-400;
}
.dark [data-rehype-pretty-code-figure] [data-highlighted-line] {
background: rgba(200, 200, 255, 0.1);
@apply border-l-blue-400;
}
[data-rehype-pretty-code-figure] [data-highlighted-chars] {
@apply rounded bg-zinc-600/50;
box-shadow: 0 0 0 4px rgb(82 82 91 / 0.5);
@apply rounded bg-zinc-400/50;
box-shadow: 0 0 0 4px rgb(161 161 170 / 0.5);
}
.dark [data-rehype-pretty-code-figure] [data-highlighted-chars] {
@apply rounded bg-zinc-500/50;
box-shadow: 0 0 0 4px rgb(113 113 122 / 0.5);
}
[data-rehype-pretty-code-figure] [data-chars-id] {