How to use an external css-file in conjunction with the default marp theme?
See original GitHub issueHello Marp-Community,
I am using marp-cli to create lecture slides. In order to fine tune the slide content, I have created a custom-css that extends some style rules implemented in the marp default css template.
My objective:
I want to externalize the css rules in a separate custom-theme.css file and remove them from the .md-document in which the slides’ content resides.
The problem:
When calling the custom-theme.css using marp-cli with the --theme-set option, I can not specify that my css “extends” the style rules of the default template or that both styles should be used in conjunction
The question:
What is the best way to tell marp-cli that my custom-theme.css should be used in conjunction with the marp default template?
Thanks in advance for the support.
N.B.
Following your support rules, I wanted to post this question on stackoverflow but creating a marp or marp-cli tag requires a reputation of 1500.
N.B.(2) I forgot to mention that I really like the marp tool set and appreciate all the hard work the developers put into the project.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Related StackOverflow Question
Hm, I’m feeling it’s weird. I’ve tried to use default theme + custom styling in minimum assets and it is working correctly.
@yhatt, I require customization in order to use extensions (markdown-it-mark, markdown-it-container, markdown-it-attrs etc.); therefore, I am using the
engine.jsimplementation as stated in the docs.Thanks for the code fragment; my code in
engine.jslooks identical to yoursI used the marp class exactly as you described but then I could not make the marp-cli to use both, the default theme and my custom theme in conjunction.
Anyway, not be best solution but I could still revert to including all style information in the markdown-file, although I would love to have them separated to reuse the custom-theme in other marp projects.