-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shiki theme not applying on code block background #2015
Comments
I am not 100% sure. The background color seems to be controlled by the CSS Variable |
It is, but this variable isn't linked to the shiki theme, it seems to be (not too much investigated ^^') hardcoded to |
This was intended to make the overall slide theme more consistent. CSS vars are made to be overridden, so it's not technically hardcoded (only the very defaults are). I am not yet sure if it's worth it to make an option to respect the Shiki's theme's bg, maybe we could generate a inlined variable where users can do something like |
My use case being to use a dark theme on the code blocks with a light theme for the slides, it is useful to respect the Shiki's theme's bg. More generally, I find it a bit surprising that the code background does not match the chosen theme, it could lead to inconsistencies with the code colours (as the text colours are those of the Siki theme), I think that if the user does the action to configure a Shiki theme, he wants to have it applied to every colour of the code blocks. |
Describe the bug
When using a theme for shiki, the colours are effectively applied to the text, but the background of the code blocks remains in the default colour.
Minimal reproduction
Steps to reproduce the behavior:
setup
folder, and in it, ashiki.ts
file (as specified in the doc) with the following content:dev
npm scriptmin-dark
code theme when in light mode and vice-versa), but the background remains the default one (i.e. a light background when in light mode and vice-versa)System infos
The text was updated successfully, but these errors were encountered: