How to style Quarto reveal presentation
Best way to customize one of Quarto reveal presentation is to use a .scss
file to provide new rule in addition of the default theme. See about Customization
---
title: "example"
format:
revealjs:
theme: [default, style.scss]
---
## Nalanda Academy
Hello
## Slide 2
Quarto
You can change one or several default values of the theme is to use the SASS variables:
/*-- scss:defaults --*/
$presentation-heading-color: green;
/*-- scss:rules --*/
You can use usual CSS rules to be more scoped to slide heading for example
/*-- scss:defaults --*/
$custom-col: green;
/*-- scss:rules --*/
.reveal section h2 {
color: $custom-col;
}
We really recommend using a custom theme like that to modify the default CSS.
About the issue with inline style
You can use inline style on html element, it should work. However, you may have found an issue with Pandoc, than is used by Quarto. The inline style set on a header is set to the all section when --section-divs
is used. This can be replicated with html format and not only revealjs.
quarto pandoc -t html -f markdown -s --section-divs -o test.html test.qmd
So it happens also with revealjs format. It is showing correctly in the visual editor because we emulate the result.