Closed jans-code closed 1 year ago
Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:
Thanks for the bug report @jans-code. @agoose77 most of the dark-mode is triggered off of CSS, except for the code, which does need to load a new style using JS.
Where we define the styles to look to Jupyter: https://github.com/executablebooks/jupyterlab-myst/blob/dedbb1d785a02612da05fa798c7091c25b607a59/tailwind.config.js#L4
The place where we need to also look to that style and change it: https://github.com/executablebooks/jupyterlab-myst/blob/dedbb1d785a02612da05fa798c7091c25b607a59/src/widget.tsx#L153
Something like looking for the theme on the body should work:
document.body.dataset.jpThemeLight === 'false'
I will put together a PR.
Nice, that works well! It does require a page refresh or to re-execute the cell but I think that is ok for now.
This has been fixed and merged, we will get a patch release out soon!
The place where we need to also look to that style and change it:
Oops. Been staring at that code so much of late that I forgot to actually read it!
No matter what theme i choose and no matter how i define the code-blocks in markdown, they are always rendered with black text.
This is also true when defining a language, for which syntax highlighting works in the default jupyter markdown view.
But with jupyterlab_myst I always get black text, i was able to fix the css in my dark theme, so the code was at least readable.