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

Opting out of a Reveal.js theme with no-theme #6342

Closed
wants to merge 1 commit into from
Closed

Opting out of a Reveal.js theme with no-theme #6342

wants to merge 1 commit into from

Conversation

jez
Copy link
Contributor

@jez jez commented May 5, 2020

I've written my own Reveal.js theme, and I'm using revealjs-url=https://revealjs.com, which means that the only way to include my theme is with Pandoc's existing css variable in the revealjs template.

The problem is that the revealjs template defaults to black.css when no theme variable is given, which means my custom theme has to go to extra effort to reset the styles introduced by black.css. I'd rather have a way to opt out of that.

I think the current default (no theme implies black.css) is a good default for people, so I've added another variable to opt in to no theme: no-theme.

---
no-theme: true
---

@jgm
Copy link
Owner

jgm commented May 7, 2020

Not sure what I think. It's always a cost to make the templates more complex (and documentation would have to be added to MANUAL.txt). Since it's not too hard to override things in your custom css, and it's not too hard to use a custom template, I'm not sure there's a compelling case.

@jez
Copy link
Contributor Author

jez commented May 8, 2020

That's fair, I can definitely understand wanting hold the API surface area low.

While it's definitely not hard to use a custom template, I like sticking to the default template as much as possible because the default templates are continually improved, especially when there are new features of pandoc that can be harnessed in a template. It the same problem with forking an open source project: when the open source project moves forward, it takes effort to backport those changes to the fork.

So I think this is a useful feature, but if you disagree, feel free to close it.

@jez
Copy link
Contributor Author

jez commented May 9, 2020

Actually, going to go ahead and close this. I got around this by writing a Makefile rule that fetches the latest default.revealjs and sed's out the black.css line:

https://github.com/jez/pandoc-starter/blob/07ebd2b0f792b5192347c7bcbe7e80954a809748/revealjs-solarized/src/Makefile#L30

For anyone who happens to find this issue: you can see the effect in these starter files in my pandoc-starter repo:

https://github.com/jez/pandoc-starter/tree/07ebd2b0f792b5192347c7bcbe7e80954a809748/revealjs-solarized

and the live effect here:

https://jez.io/talks/slides/revealjs-solarized/

@jez jez closed this May 9, 2020
@jez jez deleted the patch-1 branch May 9, 2020 02:14
@jgm
Copy link
Owner

jgm commented May 9, 2020

If enough other people have the same need, I'd reconsider this one.

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

Successfully merging this pull request may close these issues.

2 participants