Skip to contents

The text_height() function adjusts the line height of text within a tag element.

Usage

text_height(x, height)

Arguments

x

A tag element or .style pronoun.

height

A character string specifying a line height. One of,

  • "sm"

  • "small"

  • "base"

  • "lg"

  • "large"

Value

An object of the same type as x.

Examples


library(htmltools)

p(
  .style %>%
    text_height("base"),
  "This is the browser's default line height spacing.",
  "Make sure there are multiple lines of text in a paragraph.",
  "Otherwise, the changes applied by these utilities are not visible."
)
#> <p class="lh-base">
#>   This is the browser's default line height spacing.
#>   Make sure there are multiple lines of text in a paragraph.
#>   Otherwise, the changes applied by these utilities are not visible.
#> </p>