Skip to content
Discussion options

You must be logged in to vote

First if you inspect the HTML, you'll see the caption text is in p.caption element, so figcaption won't catch it.

Also, there are some CSS specificity to take into account, and you need to add a rule that will overwrite the default one. You need at least the same specificity

So you can use

/*-- scss:rules --*/

.reveal {
  .slides {
    .slide {
      img+p.caption {
        font-size: 0.5em;
      }
    }
  }
}

and also if you are just customizing a them, and not providing a full new one, you probably need to keep the default
https://quarto.org/docs/presentations/revealjs/themes.html#customizing-themes

format:
  revealjs: 
    theme: [default, custom.scss]

Hope this helps

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Damian-Oswald
Comment options

Answer selected by Damian-Oswald
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants