Changing text font size in revealjs

Hi everyone,

Just a quick query about the revealjs options one can use to create slides. I love a lot of its features but I'm unable to figure out if I can change the font size of text globally. The small html tag makes it possible to make certain sections smaller, but I'd like to know if there's an option to specify something perhaps in the YAML header for the whole slide deck. I believe CSS might be my answer but I'm genuinely confused at the various options in CSS to change font size.

Any help hugely appreciated.

Thank you!

I know this is a late response but a quick way of doing this is to add something like the following to the top of your Rmd file. This will globally set the CSS for <p> elements in your presentation using the same parameters as the <small> tag would.

    .reveal section p {
    display: inline-block;
    font-size: 0.6em;
    line-height: 1.2em;
    vertical-align: top;

This works (i.e. globally sets the css for <p> elements) but I realised after I posted that, when you add this directly to a revealjs::revealjs_presentation Rmd, a new (blank) slide is also created. I'm not sure of an easy way around this so it's probably best to copy the same CSS (minus the <style> tags) in to a css file (saved in the same location as the Rmd) and add the css option to your yaml front-matter (see

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.