Skip to content
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

Support or workaround for dark themes #9

Open
ajdajd opened this issue Oct 13, 2020 · 4 comments
Open

Support or workaround for dark themes #9

ajdajd opened this issue Oct 13, 2020 · 4 comments

Comments

@ajdajd
Copy link

ajdajd commented Oct 13, 2020

The extension works like a charm, but I wish there's a better way to view diagrams in dark themes.

image

@ajdajd
Copy link
Author

ajdajd commented Oct 13, 2020

I found a workable solution by altering the background color of a section.

image

I'll close the issue as this works for me.

@ajdajd ajdajd closed this as completed Oct 13, 2020
@TimGremalm
Copy link

TimGremalm commented May 3, 2021

I don't think the problem i solved. Please re-open it.

I tried by adding some CSS, I could manage to filter out a non light-theme by using CSS attribute selector, but think the .jp-RenderedMarkdown selector is too broad.

body[data-jp-theme-light="false"] .jp-RenderedMarkdown img{
	background: red;
}

Can we possible append classes jupyterlab-markup and appropriate svgbob mermaid to rendered SVG's?

If we had those class names we could easy add a backgroundcolor or whatever in https://github.com/agoose77/jupyterlab-markup/blob/master/style/base.css

@agoose77 agoose77 reopened this May 3, 2021
@agoose77
Copy link
Owner

agoose77 commented May 3, 2021

Whilst I think theme awareness would be a good feature, see also the dark theme : https://mermaid-js.github.io/mermaid/#/./theming?id=theme-variables-reference-table

@agoose77
Copy link
Owner

Just following this up with a TODO @agoose77 -

  • We should add a dependency upon IThemeManager so that we can call mermaid.initialize with a dark/light theme.
  • Add a configuration option for the dark and light themes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants