Skip to content

Commit 034e5b4

Browse files
authored
fix: shiki dark mode (#246)
1 parent 56ea3b9 commit 034e5b4

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

apps/docs/app/styles/geistdocs.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@
1414
html {
1515
text-rendering: optimizelegibility;
1616
}
17+
18+
/* Shiki dark mode styles */
19+
html.dark .shiki,
20+
html.dark .shiki span {
21+
color: var(--shiki-dark) !important;
22+
background-color: var(--shiki-dark-bg) !important;
23+
/* Optional, if you also want font styles */
24+
font-style: var(--shiki-dark-font-style) !important;
25+
font-weight: var(--shiki-dark-font-weight) !important;
26+
text-decoration: var(--shiki-dark-text-decoration) !important;
27+
}
28+
1729
body {
1830
@apply min-h-dvh;
1931
}

apps/docs/components/custom/preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export const Preview = async ({ path, className }: ComponentPreviewProps) => {
100100
</CodeBlockTab>
101101
<CodeBlockTab className="p-0" value="code">
102102
<div className="not-prose h-[600px] overflow-y-auto">
103-
<CodeBlock>
103+
<CodeBlock className="pt-0">
104104
{/** biome-ignore lint/security/noDangerouslySetInnerHtml: "this is needed." */}
105105
<pre dangerouslySetInnerHTML={{ __html: highlightedCode }} />
106106
</CodeBlock>

0 commit comments

Comments
 (0)