Home > Net >  Define a class of slides with inverse background in revealjs/Quarto
Define a class of slides with inverse background in revealjs/Quarto

Time:10-21

I would like to have some of the slides inverse. Notably, I would like to have the level 1 slides (these with, by default <h1> level 1 headers) inverse colors: white on black, for example.

This can be achieved as follows:

  1. define a class .inverse, and
  2. specify the background color and the .inverse class in the header of the slide

For example, include this in the style.scss file associated with the presentation:

.inverse h1 {
   color: white;
 }

And use the following to make the slide inversed

# Level 1 header {.inverse background-color="black"}

This works. However, it requires a manual specification of background and class for each slide which I would like to be inversed. Is there a way of setting it up globally, such that the contents of the curly brackets are not necessary and all level 1 slides are inverted automatically?

CodePudding user response:

You can use inverse slide for level 1 header

  • Related