修复消息里的代码块没有适配深色模式
This commit is contained in:
@@ -166,18 +166,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Shiki dual-theme: switch to dark CSS variables in dark mode */
|
/* Streamdown code blocks: dark mode via shiki dual-theme CSS variables */
|
||||||
.dark .shiki,
|
.dark [data-streamdown="code-block-body"] {
|
||||||
.dark .shiki span {
|
background-color: var(--shiki-dark-bg, var(--sdm-bg, transparent)) !important;
|
||||||
color: var(--shiki-dark) !important;
|
color: var(--shiki-dark, var(--sdm-fg, inherit)) !important;
|
||||||
background-color: var(--shiki-dark-bg) !important;
|
}
|
||||||
|
|
||||||
|
.dark [data-streamdown="code-block-body"] code > span > span {
|
||||||
|
color: var(--shiki-dark, var(--sdm-c, inherit)) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
:root:not(.light) .shiki,
|
:root:not(.light) [data-streamdown="code-block-body"] {
|
||||||
:root:not(.light) .shiki span {
|
background-color: var(--shiki-dark-bg, var(--sdm-bg, transparent)) !important;
|
||||||
color: var(--shiki-dark) !important;
|
color: var(--shiki-dark, var(--sdm-fg, inherit)) !important;
|
||||||
background-color: var(--shiki-dark-bg) !important;
|
}
|
||||||
|
|
||||||
|
:root:not(.light) [data-streamdown="code-block-body"] code > span > span {
|
||||||
|
color: var(--shiki-dark, var(--sdm-c, inherit)) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user