fix(05-02): restore Shiki token colors — add .shiki to ProsePre pre, broaden CSS selector to pre span

This commit is contained in:
2026-04-21 15:34:02 +02:00
parent f179d64253
commit 221b1a076c
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -8,10 +8,9 @@
} }
/* Code blocks: always dark regardless of color mode. /* Code blocks: always dark regardless of color mode.
Background is overridden by ProsePre wrapper (#0d1117), ProsePre wrapper owns the background (#0d1117).
only token colors come from Shiki dark variables. */ Target pre span directly — .shiki class is absent when ProsePre overrides <pre>. */
.shiki, .shiki, pre span {
.shiki span {
color: var(--shiki-dark) !important; color: var(--shiki-dark) !important;
background-color: transparent !important; background-color: transparent !important;
font-style: var(--shiki-dark-font-style) !important; font-style: var(--shiki-dark-font-style) !important;
+1 -1
View File
@@ -31,7 +31,7 @@ const props = withDefaults(defineProps<Props>(), {
<!-- Code content --> <!-- Code content -->
<div class="overflow-x-auto"> <div class="overflow-x-auto">
<pre class="m-0 bg-transparent p-4 text-sm leading-relaxed"><slot /></pre> <pre class="shiki m-0 bg-transparent p-4 text-sm leading-relaxed"><slot /></pre>
</div> </div>
</div> </div>
</template> </template>