-
Is there a way to toggle between syntax highlighting when the theme dark/light button is toggled? For example, you could generate two css files and use the correct one. Code seems to become unreadable otherwise. I have uncommented line 17 of the app.scss file and generated the chromastyle css in \static\css. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi there! There is an easy way of doing this. In you // syntax_lightmode.scss
/* Background */ .chroma { background-color: #f8f8f8 }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* ... */ // syntax_darkmode.scss
body.dark {
/* Background */ .chroma { color: #f8f8f2; background-color: #282a36 }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
}
/* ... */ Beware that you might need to tweak other things in dark mode such as the default // syntax_darkmode.scss
body.dark .chroma code { background: none; }
/* ... */ |
Beta Was this translation helpful? Give feedback.
Hi there! There is an easy way of doing this. In you
syntax_darkmode.scss
, you can enclose everything with abody.dark
selector. That way when the body changes the class that enables dark mode your code highlighting will also change. E.g.:Beware that you might need to tweak other things in dark mod…