The text_dectoration()
function adjusts how text is decorated within a tag
element.
Arguments
- x
A tag element or .style pronoun.
- decoration
A character string specifying a decoration. One of,
"underline"
"strike"
"none"
See also
Other text utilities:
text_alignment()
,
text_break()
,
text_color()
,
text_height()
,
text_selection()
,
text_style()
,
text_transform()
,
text_weight()
,
text_wrap()
Examples
library(htmltools)
div(
.style %>%
text_decoration("strike"),
"TODO: buy milk"
)
#> <div class="text-line-through">TODO: buy milk</div>
div(
.style %>%
text_emphasis(theme_danger()) %>%
text_decoration("underline"),
"Red AND underlined!"
)
#> <div class="text-danger-emphasis text-underline">Red AND underlined!</div>