tachyons | R Documentation |
Tachyons is a collection of CSS utility classes that works beautifully with xaringan presentations using the 'remarkjs“ class syntax.
use_tachyons(minified = TRUE)
html_dependency_tachyons(minified = TRUE)
minified |
Use the minified Tachyons css file? Default is |
An htmltools::tagList()
with the tachyons dependencies, or an
htmltools::htmlDependency()
.
use_tachyons()
: Adds tachyons to your xaringan slides.
html_dependency_tachyons()
: Returns an htmltools::htmlDependency()
with the tile
view dependencies. Most users will want to use use_tachyons()
.
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 ]]
tachyons, Tachyons Cheat Sheet
use_tachyons()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.