Closed what1s1ove closed 2 weeks ago
You should be able to use it as in: https://shiki.style/guide/dual-themes#without-default-color
You should be able to use it as in: https://shiki.style/guide/dual-themes#without-default-color
Ohh nice. I'm sorry, I didn't know about this functionality. Let me double check 🙏
@antfu that works! Thank you so much!
Sorry to bother you with this issue 🥲 Could you close the issue?
If anyone is interested, here is how it looks like in my project - https://github.com/what1s1ove/whatislove.dev/pull/625
Clear and concise description of the problem
Not long ago, the CSS
light-dark()
function started being supported in all browsers.This made it possible to eliminate the duplication of variable declarations for the dark theme if the project uses a dark theme both through media queries and classes.
It used to be like this:
Now it can be done like this:
The problem is that duplication for Shiki cannot be eliminated, as there is nothing to write as the first value for the
light-dark()
function.Suggested solution
As an option, add the use of the light theme to the variable, just as it is currently done for the dark theme.
Alternative
No response
Additional context
Recently, I finished implementing the
light-dark
function on one of my websites. You can check it out here –https://github.com/what1s1ove/whatislove.dev/pull/610Validations
Contributes