View source: R/style_extra_css.R
style_extra_css | R Documentation |
Adds css elements to target outfile
, typically a xaringanthemer css file.
The css
argument takes a list of CSS classes and definitions (see examples below)
and appends CSS rules to outfile
.
style_extra_css(
css,
outfile = "xaringan-themer.css",
append = TRUE,
heading = "Extra CSS"
)
css |
A named list of CSS definitions each containing a named list
of CSS property-value pairs, i.e.
|
outfile |
Customized xaringan CSS output file name, default is "xaringan-themer.css" |
append |
If |
heading |
Heading added above extra CSS. Use |
The css
input must be a named list of css properties and values within a
named list of class identifiers, for example
list(".class-id" = list("css-property" = "value"))
.
style_extra_css(
outfile = stdout(),
css = list(
".red" = list(color = "red"),
".small" = list("font-size" = "90%"),
".full-width" = list(
display = "flex",
width = "100%",
flex = "1 1 auto"
)
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.