Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change font size for individual text section in flexdashboard

I'm using flexdashboard to create reports and I want to change a font size only for one part of the page.

It feels to me that I can do it by adding CSS class, but I can't find how can I specify class name in R markdown code.

Any ideas?

like image 536
kismsu Avatar asked Sep 29 '16 07:09

kismsu


People also ask

How do you control font size in markdown?

To change the font size, you don't need to know a lot of html for this. Open the html output with notepad ++. Control F search for "font-size". You should see a section with font sizes for the headers (h1, h2, h3,...).

How do I change the font size in Wordpress text widget?

Just click on any paragraph block, then select the font size under 'Typography' on the right-hand side. You can select from the drop-down, which covers Small, Normal, Medium, Large, and Huge.


1 Answers

You can add CSS directly into your Rmarkdown document. For example, if you wanted to change the font of objects with class "chart-title" you could insert the following into your R markdown file:

---
title: "Title"
output: 
  flexdashboard::flex_dashboard:
theme: readable
orientation: columns
vertical_layout: fill
---

<style type="text/css">

.chart-title {  /* chart_title  */
   font-size: 30px;
   font-family: Algerian;

</style>
like image 134
iantist Avatar answered Sep 22 '22 16:09

iantist