Skip to content

how to specify highlight.js theme in css #304

Answered by yhatt
infinitesteps asked this question in Q&A
Discussion options

You must be logged in to vote

~highlight.js is a syntax of sass-loader/rollup-plugin-postcss to resolve the path of node_modules. Marp Core is using rollup-plugin-postcss to build and bundle themes.

#73 (reply in thread)

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…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yhatt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants