how to specify highlight.js theme in css #304
-
When creating a CSS theme, how do I specify the highlight.js style and what styles are available? Based on the syntax in gaia.scss I tried the following: @import '~highlight.js/styles/zenburn'; But that didn't seem to work. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Setting up Sass preprocessor (and tools in around) is required to import highlight.js theme through Or you can pick a theme from highlight.js source and put raw styles to your theme directly. FYI: We know highlight.js theming is one of confusable things in Marp theme, so have planned a new highlight system at marp-team/marp-core#296. You may have to follow up the update of code highlight in the future (but I promise changing highlight colors is going to become simpler than current :) |
Beta Was this translation helpful? Give feedback.
Setting up Sass preprocessor (and tools in around) is required to import highlight.js theme through
@import
correctly. The compiled theme CSS will replace@import
to its contents. Marp ecosystem is always using the compiled themes.Or you can pick a theme from highlight.js source and put raw styles to your theme directly.
https://github.com/highlightjs/highlight.js/tree/main/src/styles
FYI: We know highlight.js theming is one of confusable things in Marp theme, so have planned a new highlight sys…