fix(05-02): restore Shiki token colors — add .shiki to ProsePre pre, broaden CSS selector to pre span
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user