The following table shows the template variables, their default values in the standard xaringanthemer 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 some theme functions, like style_mono_accent(), have additional parameters and a specific set of default values unique to the theme. However, with any theme function you can override the theme’s defaults by directly setting any of the arguments listed below when calling the theme function.

To be concrete, style_mono_accent() has three additional arguments: base_color (the accent color), white_color, and black_color. In this theme, the background slide color defaults to white_color, but you can choose a different slide background color by setting background_color, for example background_color = "#EAEAEA".

Variable Description Element Default CSS Variable
text_color Text Color body #000 –text_color
header_color Header Color h1, h2, h3 #000 –header-color
background_color Slide Background Color .remark-slide-content #FFF –background-color
link_color Link Color a, a > code rgb(249, 38, 114) –link-color
text_bold_color Bold Text Color strong NULL –text-bold-color
text_slide_number_color Slide Number Color .remark-slide-number inverse_background_color NA
padding Slide Padding in top right [bottom left] format .remark-slide-content 16px 64px 16px 64px NA
background_image Background image applied to each and every slide. Set title_slide_background_image = "none" to remove the background image from the title slide .remark-slide-content NULL NA
background_size 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 .remark-slide-content NULL NA
background_position Background image position, requires background_image to be set, and it is recommended to adjust background_size .remark-slide-content NULL NA
code_highlight_color Code Line Highlight .remark-code-line-highlighted rgba(255,255,0,0.5) –code-highlight-color
code_inline_color Inline Code Color .remark-inline-code #000 NA
code_inline_background_color Inline Code Background Color .remark-inline-code NULL NA
code_inline_font_size Inline Code Text Font Size .remark-inline-code 1em –code-inline-font-size
inverse_background_color Inverse Background Color .inverse #272822 –inverse-background-color
inverse_text_color Inverse Text Color .inverse #d6d6d6 –inverse-text-color
inverse_text_shadow Enables Shadow on text of inverse slides .inverse FALSE NA
inverse_header_color Inverse Header Color .inverse h1, .inverse h2, .inverse h3 #f3f3f3 –inverse-header-color
title_slide_text_color Title Slide Text Color .title-slide inverse_text_color –title-slide-text-color
title_slide_background_color Title Slide Background Color .title-slide inverse_background_color –title-slide-background-color
title_slide_background_image Title Slide Background Image URL .title-slide NULL NA
title_slide_background_size Title Slide Background Image Size, defaults to “cover” if background image is set .title-slide NULL NA
title_slide_background_position Title Slide Background Image Position .title-slide NULL NA
footnote_color Footnote text color (if NA, then it will be the same color as text_color) .footnote NULL NA
footnote_font_size Footnote font size .footnote 0.9em NA
footnote_position_bottom Footnote location from bottom of screen .footnote 60px NA
left_column_subtle_color Left Column Text (not last) .left-column h2, .left-column h3 #777 NA
left_column_selected_color Left Column Current Selection .left-column h2:last-of-type, .left-column h3:last-child #000 NA
blockquote_left_border_color Blockquote Left Border Color blockquote lightgray NA
table_border_color Table top/bottom border table: border-top, border-bottom #666 NA
table_row_border_color Table row inner bottom border table thead th: border-bottom #ddd NA
table_row_even_background_color Table Even Row Background Color thead, tfoot, tr:nth-child(even) #eee NA
base_font_size Base Font Size for All Slide Elements (must be px) html 20px –base-font-size
text_font_size Slide Body Text Font Size .remark-slide-content 1rem –text-font-size
header_h1_font_size h1 Header Text Font Size .remark-slide-content h1 2.75rem –header-h1-font-size
header_h2_font_size h2 Header Text Font Size .remark-slide-content h2 2.25rem –header-h2-font-size
header_h3_font_size h3 Header Text Font Size .remark-slide-content h3 1.75rem –header-h3-font-size
header_background_auto Add background under slide title automatically for h1 header elements. If not enabled, use class: header_background to enable FALSE NA
header_background_color Background Color for h1 Header with Background .remark-slide-content h1 header_color –header-background-color
header_background_text_color Text Color for h1 Header with Background .remark-slide-content h1 background_color –header-background-text-color
header_background_padding Padding for h1 Header with Background .remark-slide-content h1 NULL NA
header_background_content_padding_top Top Padding for Content in Slide with Header with Background .remark-slide-content 7rem NA
header_background_ignore_classes Slide Classes Where Header with Background will not be Applied .remark-slide-content c(‘normal’, ‘inverse’, ‘title’, ‘middle’, ‘bottom’) NA
text_slide_number_font_size Slide Number Text Font Size .remark-slide-number 0.9em NA
text_font_google Use google_font() to specify body font body NULL NA
text_font_family Body Text Font Family (xaringan default is 'Droid Serif') body Noto Sans –text-font-family
text_font_weight Body Text Font Weight body normal NA
text_font_url Body Text Font URL(s) @import url() https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap NA
text_font_family_fallback Body Text Font Fallbacks body -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial –text-font-family-fallback
text_font_base Body Text Base Font (Total Failure Fallback) body sans-serif –text-font-base
header_font_google Use google_font() to specify header font body NULL NA
header_font_family Header Font Family (xaringan default is 'Yanone Kaffeesatz') h1, h2, h3 Cabin –header-font-family
header_font_weight Header Font Weight h1, h2, h3 600 NA
header_font_url Header Font URL @import url https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap NA
code_font_google Use google_font() to specify code font body NULL NA
code_font_family Code Font Family .remark-code, .remark-inline-code Source Code Pro –code-font-family
code_font_size Code Text Font Size .remark-inline 0.9rem –code-font-size
code_font_url Code Font URL @import url https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap NA
code_font_family_fallback Code Font Fallback .remark-code, .remark-inline-code Menlo, Consolas, Monaco, Liberation Mono, Lucida Console NA