Is there with marp to use a different theme only for a code block? or for all code blocks?

351 Views Asked by At

I really love making slide decks with marp and as I show a lot of code I really love that syntax highlighting is part of it.

I am using the light default theme and change it a bit with a css extra file and now I came across the issue, that I would love to have the syntax highlited as in the dark theme but the rest of the slides still in style of the light theme.

How would I do this (without rewriting the whole css code)?

I was wondering if something like this idea is possibel:

---
marp: true
title: Some document
author: Helle
language: en
version: 1.0.0
size: 4:3
paginate: true
theme: default
style: @import url('https://unpkg.com/tailwindcss@^2/dist/utilities.min.css');
header: ' '
footer: 'blah blah blah'
---

...

---
# Some Headline

- item 1
- item 2

<!--theme: invert -->
\```javascript
some.javascript(code)
\```

thanks for any suggestions...

0

There are 0 best solutions below