Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: custom theme for a single slide #181

Closed
coorasse opened this issue Jul 31, 2019 · 2 comments
Closed

Feature request: custom theme for a single slide #181

coorasse opened this issue Jul 31, 2019 · 2 comments

Comments

@coorasse
Copy link

I see that currently is possible to define a scoped style for a single slide with #94
this forces us to put CSS in the markdown file, making it less readable.
Since there is already support for custom CSS theme files, it would be great to assign a CSS class to a single slide and move the CSS in the theme file.
Adding a custom class to the section would be great.

@yhatt
Copy link
Member

yhatt commented Aug 1, 2019

We have already supported defining custom class to a single slide through class local directive (with spot directive, an one of local directive usage).

https://marpit.marp.app/directives?id=styling-slide

/* @theme your-theme */

section {
  background: white;
}

section.red {
  background: red
}
---
theme: your-theme
---

# Regular page

---
<!-- _class: red -->

# Red background

@coorasse Would you have any problem that is not enough this usage?

@coorasse
Copy link
Author

coorasse commented Aug 5, 2019

Hi, thanks for your feedback. I tried your approach and the result is what I expect.
What I was missing was the section.myclass { ... } part in the CSS.
I previously defined only .myclass { ... } and this was not working.

@coorasse coorasse closed this as completed Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants