The following table shows the template variables, their default values in the standard xaringan theme, the primary element to which the property is applied, and a brief description of the template variable.
For example, background_color by default sets the background-color CSS property of the .remark-slide-content class to #FFF.
Use this table to find the template variable you would like to modify. You can also use this table to find the CSS class or element associated with a particular template item.
Note that themes, like mono_accent(), have additional parameters, but with any theme function you can override the theme by directly setting the arguments below when calling the theme function. For example, to use mono_accent() with a different slide background color, you can call mono_accent(background_color = "#abc123").
| variable | default | element | description |
|---|---|---|---|
text_color |
#000 |
body | Text Color |
header_color |
#000 |
h1, h2, h3 | Header Color |
background_color |
#FFF |
.remark-slide-content | Slide Background Color |
link_color |
rgb(249, 38, 114) |
a, a > code | Link Color |
text_bold_color |
NULL |
strong | Bold Text Color |
text_slide_number_color |
inverse_background_color |
.remark-slide-number | Slide Number Color |
padding |
1rem 4rem 1rem 4rem |
.remark-slide-content | Slide Padding in top right [bottom left] format |
background_image |
NULL |
.remark-slide-content | Background image applied to each and every slide. Set title_slide_background_image = "none" to remove the background image from the title slide |
background_size |
NULL |
.remark-slide-content | Background image size, requires background_image to be set. If background_image is set, background_size will default to cover so the backround fills the screen. If both background_image and background_position are set, will default to 100 percent |
background_position |
NULL |
.remark-slide-content | Background image position, requires background_image to be set, and it is recommended to adjust background_size
|
code_highlight_color |
rgba(255,255,0,0.5) |
.remark-code-line-highlighted | Code Line Highlight |
code_inline_color |
#000 |
.remark-inline-code | Inline Code Color |
code_inline_background_color |
NULL |
.remark-inline-code | Inline Code Background Color |
code_inline_font_size |
1em |
.remark-inline-code | Inline Code Text Font Size |
inverse_background_color |
#272822 |
.inverse | Inverse Background Color |
inverse_text_color |
#d6d6d6 |
.inverse | Inverse Text Color |
inverse_text_shadow |
FALSE |
.inverse | Enables Shadow on text of inverse slides |
inverse_header_color |
#f3f3f3 |
.inverse h1, .inverse h2, .inverse h3 | Inverse Header Color |
title_slide_text_color |
inverse_text_color |
.title-slide | Title Slide Text Color |
title_slide_background_color |
inverse_background_color |
.title-slide | Title Slide Background Color |
title_slide_background_image |
NULL |
.title-slide | Title Slide Background Image URL |
title_slide_background_size |
NULL |
.title-slide | Title Slide Background Image Size, defaults to “cover” if background image is set |
title_slide_background_position |
NULL |
.title-slide | Title Slide Background Image Position |
footnote_color |
NULL |
.footnote | Footnote text color (if NA, then it will be the same color as text_color) |
footnote_font_size |
0.9em |
.footnote | Footnote font size |
footnote_position_bottom |
3em |
.footnote | Footnote location from bottom of screen |
left_column_subtle_color |
#777 |
.left-column h2, .left-column h3 | Left Column Text (not last) |
left_column_selected_color |
#000 |
.left-column h2:last-of-type, .left-column h3:last-child | Left Column Current Selection |
blockquote_left_border_color |
lightgray |
blockquote | Blockquote Left Border Color |
table_border_color |
#666 |
table: border-top, border-bottom | Table top/bottom border |
table_row_border_color |
#ddd |
table thead th: border-bottom | Table row inner bottom border |
table_row_even_background_color |
#eee |
thead, tfoot, tr:nth-child(even) | Table Even Row Background Color |
text_font_size |
20px |
.remark-slide-content | Slide Body Text Font Size |
header_h1_font_size |
55px |
.remark-slide-content h1 | h1 Header Text Font Size |
header_h2_font_size |
45px |
.remark-slide-content h2 | h2 Header Text Font Size |
header_h3_font_size |
35px |
.remark-slide-content h3 | h3 Header Text Font Size |
header_background_auto |
FALSE |
Add background under slide title automatically for h1 header elements. If not enabled, use class: header_background to enable |
|
header_background_color |
header_color |
.remark-slide-content h1 | Background Color for h1 Header with Background |
header_background_text_color |
background_color |
.remark-slide-content h1 | Text Color for h1 Header with Background |
header_background_padding |
2rem 4rem 1.5rem 4rem |
.remark-slide-content h1 | Padding for h1 Header with Background |
header_background_content_padding_top |
7rem |
.remark-slide-content | Top Padding for Content in Slide with Header with Background |
header_background_ignore_classes |
c('normal', 'inverse', 'title', 'middle', 'bottom') |
.remark-slide-content | Slide Classes Where Header with Background will not be Applied |
text_slide_number_font_size |
0.9em |
.remark-slide-number | Slide Number Text Font Size |
text_font_google |
NULL |
body | Use google_font() to specify body font |
text_font_family |
'Droid Serif' |
body | Body Text Font Family |
text_font_weight |
normal |
body | Body Text Font Weight |
text_font_url |
https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic |
@import url() | Body Text Font URL(s) |
text_font_family_fallback |
'Palatino Linotype', 'Book Antiqua', Palatino, 'Microsoft YaHei', 'Songti SC' |
body | Body Text Font Fallbacks |
text_font_base |
serif |
body | Body Text Base Font (Total Failure Fallback) |
header_font_google |
NULL |
body | Use google_font() to specify header font |
header_font_family |
'Yanone Kaffeesatz' |
h1, h2, h3 | Header Font Family |
header_font_weight |
normal |
h1, h2, h3 | Header Font Weight |
header_font_url |
https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz |
@import url | Header Font URL |
code_font_google |
NULL |
body | Use google_font() to specify code font |
code_font_family |
'Source Code Pro' |
.remark-code, .remark-inline-code | Code Font Family |
code_font_size |
0.9em |
.remark-inline | Code Text Font Size |
code_font_url |
https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700 |
@import url | Code Font URL |
code_font_family_fallback |
'Lucida Console', Monaco |
.remark-code, .remark-inline-code | Code Font Fallback |