-
Notifications
You must be signed in to change notification settings - Fork 16
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
Preview not compatible with dark themes #1
Comments
Thanks for trying the extension and opening this issue. I have overlooked that there might be an issue with dark themes... obviously I'm using light... ;) The documentation does not mention how to detect programatically if the active theme is light or dark so that I can provide appropriate theme for each case. The API offers limited styling options targeted mainly at text content. Investigating what is the best way to handle this situation... |
One simple (but sub optimal) solution is to find a shade of grey that is visible against both backgrounds: dark and light. Or perhaps some other color. Obviously, "the right way" would be to detect the vs theme and choose mermaid theme accordingly. Let's hope we can find a way to do that. |
There is also the option to have an extension specific workspace setting that controls the stylesheet but that is not optimal either. I've asked a question on this topic on SO. Maybe someone will provide the right answer... |
@jrieken any chance to get isLightTheme and getTheme exposed on the public API? |
I can think of a class we set on the document, ala |
We are talking about the body of the document that the extension is passing when |
correct |
I guess this would enable fixing this issue. Any timeline for when this would be available in vscode? |
we'll have something end of May |
Waiting the next vscode version and mermaid update to be published to npm to solve this issue... |
@jrieken has this made it to 1.2 release? I wasn't able to spot it in the new features list... I might have missed it as the list was quite long... :) |
this feature works in vscode 1.3 or newer. |
Preview is not compatible with dark themes of VS Code. Arrows and texts should be in white on dark background.
See screenshot below:
The text was updated successfully, but these errors were encountered: