You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Text in code blocks while using custom dark themes is hardly visible. It seems that the highlight.js theme is applied incorrectly (in the default dark theme, atom-one-dark is used for highlight.js, but it seems that it is not applied while using custom themes).
Steps to reproduce
Apply a custom dark theme
Notice that text in all code blocks look weird
Version information
Platform: browser
For the web app:
Browser: Firefox 90
OS: Arch Linux
Element Version: v1.7.33
Notes
Comparison between official dark theme and custom ones:
After checking the generated theme-dark-custom.css (bundles/1bb29ac412a6c33a90c2/theme-dark-custom.css in my case), it seems that the hljs styles are simply not present there, but in theme-dark.css they are. Manually enabling theme-dark.css (by removing the disabled flag for the <link> element) while a custom theme is used seems to fix the code blocks, but this is probably the wrong way to do it.
The text was updated successfully, but these errors were encountered:
I think the initial issue (as shown on the screenshots) has been fixed in v1.9.4 by matrix-org/matrix-react-sdk/pull/6384
However, another bug stays: hljs styles do not persist in code blocks when custom themes are used.
My observations:
When you send a code block when using a custom theme (like Discord Dark), hljs styles are applied normally
When you restart Element Desktop and you have a custom theme enabled by default (using "default_theme": "custom-Discord Dark" in config.json), code is not highlighted:
If you switch to the default Dark theme and then back once, the code becomes highlighted:
But if you repeat this step one more time, the text is grey again (no styles are applied, on restart too)
It looks like a hljs refresh event is not firing correctly for custom themes.
Description
Text in code blocks while using custom dark themes is hardly visible. It seems that the highlight.js theme is applied incorrectly (in the default dark theme,
atom-one-dark
is used for highlight.js, but it seems that it is not applied while using custom themes).Steps to reproduce
Version information
For the web app:
Notes
Comparison between official dark theme and custom ones:
From top to bottom: default dark theme, Discord Dark Theme, Nord Dark.
After checking the generated
theme-dark-custom.css
(bundles/1bb29ac412a6c33a90c2/theme-dark-custom.css
in my case), it seems that thehljs
styles are simply not present there, but intheme-dark.css
they are. Manually enablingtheme-dark.css
(by removing thedisabled
flag for the<link>
element) while a custom theme is used seems to fix the code blocks, but this is probably the wrong way to do it.The text was updated successfully, but these errors were encountered: