You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And the current rehype-pretty-code documentation seems to imply that the theme keys (--shiki-light and --shiki-light-bg in this example) are added to the <code> element:
However, I only see that the theme keys are added to the <span> elements, which also seems to match with my short read of the source code with the theme keys only added on the <span> elements.
Unless I'm missing something, the fix needed is to add the theme keys to <pre>, <code>, or even <figure> (to include <figcaption>) so it's possible to set the background color of the code block based on the theme.
The text was updated successfully, but these errors were encountered:
The Shiki dual-themes documentation shows that it adds theme keys to the <pre> element in the in-line styles:
And the current rehype-pretty-code documentation seems to imply that the theme keys (
--shiki-light
and--shiki-light-bg
in this example) are added to the <code> element:However, I only see that the theme keys are added to the <span> elements, which also seems to match with my short read of the source code with the theme keys only added on the <span> elements.
Unless I'm missing something, the fix needed is to add the theme keys to <pre>, <code>, or even <figure> (to include <figcaption>) so it's possible to set the background color of the code block based on the theme.
The text was updated successfully, but these errors were encountered: