-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Pass themes option to Shiki? #18
Comments
WorkaroundCurrently, I am using |
Yes, providing the themes as a plugin option to Keep in mind that the With this, you can simply define your theme in CSS and overwrite the defaults: https://github.com/nkzw-tech/remdx/blob/main/packages/remdx/style.css#L29-L142 This way your slide deck will look great in light and dark mode. |
Ah, interesting, mapping the literal colors to CSS variables 🤔 Is it desirable to rework this a bit to make this less hacky? (or at least reducing the indirection) Eg. what about using something like |
Ok, I'll try to a PR for this. Should this also include new entries to |
A proper fix to expose CSS variable directly should happen in Shiki itself. It doesn't really make sense to swap out one approach for another imho.
Yes. |
cc @antfu would exposing CSS variables from Shiki make sense as a feature? If I'm understanding correctly, this would enable light and dark mode syntax highlighting (in this case for ReMDX) |
Are you talking about https://shiki.style/guide/theme-colors#css-variables-theme? It's already possible. Just note that using CSS variables is a approximate approach (you won't get as accurate result as normal themes). |
Similar to #17 (customization of the
Slide
container style), it would be nice to also be able to customize the Shikithemes
array option, so that a different highlighter can be used:remdx/packages/vite-plugin-remdx/index.ts
Lines 142 to 147 in fa5802d
Maybe it makes sense as an option for
@nkzw/vite-plugin-remdx
?The text was updated successfully, but these errors were encountered: