jupyterlab-markup icon indicating copy to clipboard operation
jupyterlab-markup copied to clipboard

Support or workaround for dark themes

Open ajdajd opened this issue 4 years ago • 4 comments

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

image

ajdajd avatar Oct 13 '20 17:10 ajdajd

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 avatar Oct 13 '20 17:10 ajdajd

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

TimGremalm avatar May 03 '21 22:05 TimGremalm

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 avatar May 03 '21 23:05 agoose77

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

agoose77 avatar May 21 '21 07:05 agoose77