Closed ghost closed 2 years ago
I think it might be best to toggle the body class directly unless there's any reason to object on that?
This is not possible and the webview panel DOM is not exposed in the VSC window API.
There should probably also be a system
setting to use the OS theme (as in @media (prefers-color-theme: dark)
I've looked into it and I personally think there should just be a light-only extension. The work is already done over at https://github.com/OzakIOne/markdown-github-dark/tree/ed05b28. It's a simple matter of a couple grep
-sed
s.
If a container is injected to the Markdown preview, that might mislead people into thinking the container's part of core.
IMO, the choice of dark-only and light-only is covered. Does this resolve the review?
It would be a nicer if this extension could provide this functionality since it already would be shipping the light and dark GitHub color themes
Did you run into any issues with the container approach?
I don't know how to implement it
I've enabled edits by maintainers, would you like to help implement it or mark this with help-wanted
?
Bumping
I will review PRs but don't have time atm to do lots of work fixing up incomplete ones like this
That's okay, I've made a call for help on the extension Slack in the meantime
I think it would be better to toggle the classes using a simpler script:
Does this allow support for posting worker messages like how image-preview
did? For live switching of course.
Theme can be configured, what do you think? I threw in a free system
setting if people want to sync with their OS theme!
@SNDST00M Thanks for all the hard work on this. I can't wait to use it.
My 2 cents: Might be worth adding the config value(s) to the README or docs somewhere. Most VSCode extensions include something like
"markdown-preview-github-styles.colorMode": [ dark, light, etc.. ]
In the README.md in the root level.
Done.
@mjbvz as I'm sure Moo would concur, this pull looks ready to ship :)
Great work! Will publish this update shortly
Published in 1.0.0!
Please give it a quick test pass though. I made a few changes to the implementation and the styling. Specifically I've removed the extra container/padding that was previously around the markdown content and added back a max-width:
I really like it, nicely done :)
Way to go guys!! thank you. I love this extension
Thanks to all involved :)
Once they spoke of it in hushed tones... it is now time. Closes #65. Fixes #39.