-
I would like to customize the appearance of my callouts in a revealjs presentation.
Any idea or pointer ? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 12 replies
-
(Since you mentioned .scss) If you need scss specifically, you need to be mindful of quarto's notion of Sass layers: https://quarto.org/docs/output-formats/html-themes-more.html#bootswatch-sass-theme-files (see here for examples: https://github.com/quarto-dev/quarto-cli/tree/main/src/resources/formats/html/bootstrap/themes) But it looks like you're attempting to use plain CSS, and that's simpler. test.qmd
styles.css.callout.callout-style-default .callout-body {
background-color: red;
} output: So we know that is being picked up. Now you need to find the right way to set the font size. What's happening with font-size specifically is that your selector is losing to other rules because of (I suspect) CSS specificity rules. Look at the chrome inspector: You'll need to find a better selector (and I trust your CSS expertise here since you found .callout-body, etc..!) |
Beta Was this translation helpful? Give feedback.
-
I've made some progress using :
but the Don't know how to apply the same font-size coefficient when using this option :
Any ideas ? |
Beta Was this translation helpful? Give feedback.
-
On this theme, but attempting to do something simpler, I'd like to edit the colour of the callouts in a revealjs presentation using scss variables. I have set I have set in
After inspecting elements, I have also tried setting, e.g., the following CSS:
but that doesn't work, seemingly because And here's a .qmd to test it:
|
Beta Was this translation helpful? Give feedback.
-
The other workaround is to just tack a second class onto the callouts in your doc—it's not as neat as a pure-CSS solution, but if you just need to get something working quickly for a single doc, maybe it's the way to get the specificity you need 🙂
And the CSS file:
|
Beta Was this translation helpful? Give feedback.
-
Along with all the above queries I am also trying to change the size of the callout box. That would be really helpful for my slides if possible. |
Beta Was this translation helpful? Give feedback.
-
For others stumbling across this, to adjust all of the callouts' text size at once, just add this
NB. based on @cderv's suggestion, thanks!! |
Beta Was this translation helpful? Give feedback.
-
This is now possible from Quarto 1.6.33 to customize callouts with the same variables than Bootstrap |
Beta Was this translation helpful? Give feedback.
This is now possible from Quarto 1.6.33 to customize callouts with the same variables than Bootstrap
https://prerelease.quarto.org/docs/presentations/revealjs/themes.html#sass-variables