Skip to content

Commit 9805c1b

Browse files
Revert "update code box theme and highlighting (#617)"
This reverts commit 19ee4f8.
1 parent 19ee4f8 commit 9805c1b

File tree

2 files changed

+12
-26
lines changed

2 files changed

+12
-26
lines changed

src/components/Markdown.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export function CodeBlock({
176176
<pre ref={ref} className={`shiki github-light h-full`}>
177177
<code>{lang === 'mermaid' ? <svg /> : code}</code>
178178
</pre>
179-
<pre className={`shiki vitesse-dark`}>
179+
<pre className={`shiki tokyo-night`}>
180180
<code>{lang === 'mermaid' ? <svg /> : code}</code>
181181
</pre>
182182
</>,
@@ -186,7 +186,7 @@ export function CodeBlock({
186186
typeof document !== 'undefined' ? 'useLayoutEffect' : 'useEffect'
187187
](() => {
188188
;(async () => {
189-
const themes = ['github-light', 'vitesse-dark']
189+
const themes = ['github-light', 'tokyo-night']
190190
const normalizedLang = LANG_ALIASES[lang] || lang
191191
const effectiveLang =
192192
normalizedLang === 'mermaid' ? 'plaintext' : normalizedLang
@@ -302,7 +302,7 @@ let highlighterPromise: Promise<HighlighterGeneric<any, any>> | null = null
302302
async function getHighlighter(language: string) {
303303
if (!highlighterPromise) {
304304
highlighterPromise = createHighlighter({
305-
themes: ['github-light', 'vitesse-dark'],
305+
themes: ['github-light', 'tokyo-night'],
306306
langs: [
307307
'typescript',
308308
'javascript',

src/styles/app.css

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ pre {
343343
pre.shiki {
344344
overflow-x: auto;
345345

346-
&.vitesse-dark {
346+
&.tokyo-night {
347347
@apply text-gray-400;
348348
}
349349
}
@@ -371,26 +371,12 @@ pre.shiki .language-id {
371371
display: none;
372372
}
373373

374-
span.line {
375-
display: inline-block;
376-
width: 100%;
377-
}
378-
379-
pre.has-diff span.diff {
380-
width: calc(100% + 20px);
381-
margin-left: -10px;
382-
padding-right: 20px;
383-
padding-left: 10px;
384-
padding-top: 4px;
385-
padding-bottom: 4px;
386-
}
387-
388374
pre.has-diff span.remove {
389-
background-color: #f43f5e29;
375+
background-color: #ff000036;
390376
}
391377

392378
pre.has-diff span.add {
393-
background-color: #10b98129;
379+
background-color: #00ff0036;
394380
}
395381
/* Visually differentiates twoslash code samples */
396382
pre.twoslash {
@@ -664,7 +650,7 @@ pre .logger.log-log svg {
664650
margin-right: 9px;
665651
}
666652

667-
html:not(.dark) .shiki.vitesse-dark {
653+
html:not(.dark) .shiki.tokyo-night {
668654
display: none;
669655
}
670656

@@ -673,11 +659,11 @@ html.dark .shiki.github-light {
673659
}
674660

675661
/* Improve comment contrast in dark mode */
676-
html.dark .shiki.vitesse-dark .token.comment,
677-
html.dark .shiki.vitesse-dark span[style*='color:#565F89'],
678-
html.dark .shiki.vitesse-dark span[style*='color: #565F89'],
679-
html.dark .shiki.vitesse-dark span[style*='color:#51597D'],
680-
html.dark .shiki.vitesse-dark span[style*='color: #51597D'] {
662+
html.dark .shiki.tokyo-night .token.comment,
663+
html.dark .shiki.tokyo-night span[style*='color:#565F89'],
664+
html.dark .shiki.tokyo-night span[style*='color: #565F89'],
665+
html.dark .shiki.tokyo-night span[style*='color:#51597D'],
666+
html.dark .shiki.tokyo-night span[style*='color: #51597D'] {
681667
color: #9099c0 !important;
682668
}
683669

0 commit comments

Comments
 (0)