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 5c35d13d3e
commit 1810a6e121
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.
Background is overridden by ProsePre wrapper (#0d1117),
only token colors come from Shiki dark variables. */
.shiki,
.shiki span {
ProsePre wrapper owns the background (#0d1117).
Target pre span directly — .shiki class is absent when ProsePre overrides <pre>. */
.shiki, pre span {
color: var(--shiki-dark) !important;
background-color: transparent !important;
font-style: var(--shiki-dark-font-style) !important;
+1 -1
View File
@@ -31,7 +31,7 @@ const props = withDefaults(defineProps<Props>(), {
<!-- Code content -->
<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>
</template>