tachyons {xaringanExtra} | R Documentation |
Tachyons
Description
Tachyons is a collection of CSS utility classes that works beautifully with xaringan presentations using the 'remarkjs“ class syntax.
Usage
use_tachyons(minified = TRUE)
html_dependency_tachyons(minified = TRUE)
Arguments
minified |
Use the minified Tachyons css file? Default is |
Value
An htmltools::tagList()
with the tachyons dependencies, or an
htmltools::htmlDependency()
.
Functions
-
use_tachyons()
: Adds tachyons to your xaringan slides. -
html_dependency_tachyons()
: Returns anhtmltools::htmlDependency()
with the tile view dependencies. Most users will want to useuse_tachyons()
.
Usage
To add tachyons to your xaringan presentation, add the following code chunk to your slides' R Markdown file.
```{r xaringan-tachyons, echo=FALSE} xaringanExtra::use_tachyons() ```
Tachyons provides small, single-purpose CSS classes that are easily composed
to achieve larger functionality and styles. In the remarkjs content classes syntax, you
can compose classes by chaining them together. For example, the following
markdown produces a box with a washed green background (.bg-washed-green
),
a dark green border (.b--dark-green
) on all sides (.ba
) with line width
2 (.bw2
) and border radius (.br3
). The box has a shadow (.shadow-5
)
and medium-large horizontal padding (.ph4
) with a large top margin
(.mt5
).
.bg-washed-green.b--dark-green.ba.bw2.br3.shadow-5.ph4.mt5[ The only way to write good code is to write tons of bad code first. Feeling shame about bad code stops you from getting to good code .tr[ — Hadley Wickham ]]
References
tachyons, Tachyons Cheat Sheet
Examples
use_tachyons()