Skip to content

Commit 2a138b0

Browse files
committed
Adapt dark color scheme for code
1 parent 12b767a commit 2a138b0

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/styles/global.css

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pre.shiki {
5858
}
5959

6060
.format-code pre code {
61-
@apply before:!content-none after:!content-none bg-slate-100 dark:bg-black border-[0px] border-slate-500/50 px-1 py-0.5 rounded-sm w-full max-w-3xl mx-auto;
61+
@apply before:!content-none after:!content-none bg-slate-100 dark:bg-slate-900 border-[0px] border-slate-500/50 px-1 py-0.5 rounded-sm w-full max-w-3xl mx-auto;
6262
}
6363

6464
figure {
@@ -68,19 +68,14 @@ figure {
6868
@media (prefers-color-scheme: dark) {
6969
.shiki,
7070
.shiki span {
71-
color: var(--shiki-dark) !important;
72-
background-color: var(--shiki-dark-bg) !important;
73-
/* Optional, if you also want font styles */
74-
font-style: var(--shiki-dark-font-style) !important;
75-
font-weight: var(--shiki-dark-font-weight) !important;
76-
text-decoration: var(--shiki-dark-text-decoration) !important;
71+
@apply dark:!bg-slate-900;
7772
}
7873
}
7974

8075
@media (prefers-color-scheme: light) {
8176
.shiki,
8277
.shiki span {
83-
@apply !bg-slate-100 dark:!bg-slate-700;
78+
@apply !bg-slate-100;
8479
}
8580
}
8681

0 commit comments

Comments
 (0)