Open anders-kiaer opened 3 years ago
Good catch @anders-kiaer - that was not intended. We're adding our class hljs-dark
for the dark theme, which indicates we need our own version of the dark theme regardless. I guess the easiest (assuming the hljs v10 bump didn't change its internally-applied classes) is to just bring back the .hljs-dark
pieces of the pre-871 CSS file.
@alexcjohnson is this still on the radar? The highlight_config
still has no effect
In the meantime, I figured out a workaround: https://community.plotly.com/t/how-to-change-the-theme-of-code-highlights-in-dcc-markdown/58004
As stated in the
dcc.Markdown
documentation (https://dash.plotly.com/dash-core-components/markdown) you can useAfter
dash-core-components==1.13
, the settings ofhighlight_config
has no effect. This :beetle: appears to be introduced in #871 where onecss
file (defining bothlight
anddark
theme) was changed with anothercss
file defining only alight
theme variation.As stated on another page (https://dash.plotly.com/external-resources#md-syntax-highlight) in the docs, you can override default
highlight.js
style if you want other than e.g. the current GitHub style, however, I don't think it is intended fromdcc
point of view that the defaultdcc
provided style needs to be overridden in order forhiglight_config
to have effect (if so it should be stated close to thehighlight_config
explanation probably in the documentation).Test case:
gives the same result as when
{"theme": "light"}
.