Skip to contents

The text_dectoration() function adjusts how text is decorated within a tag element.

Usage

text_decoration(x, decoration)

Arguments

x

A tag element or .style pronoun.

decoration

A character string specifying a decoration. One of,

  • "underline"

  • "strike"

  • "none"

Value

An object of the same type as x.

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>