Quarto revealjs with custom figure caption size. #5014
-
I would like to decrease the size of the figure caption document-wide, by using an Here's an example code for the quarto file:
It uses the following simplified
Yet, whatever font size I set, it doesn't change the generated figure caption size at all. Does anybody know how I have to change the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
First if you inspect the HTML, you'll see the caption text is in 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 format:
revealjs:
theme: [default, custom.scss] Hope this helps |
Beta Was this translation helpful? Give feedback.
First if you inspect the HTML, you'll see the caption text is in
p.caption
element, sofigcaption
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
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
Hope this helps