text_size: Text size

View source: R/text-size.R

text_sizeR Documentation

Text size

Description

The text_size() function adjusts the font size of a tag element.

Usage

text_size(x, size)

Arguments

x

A tag element or .style pronoun.

size

A number specifying a font size for the text. One of,

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

    The sizes follow the conventions of HTML heading tags, so 1 is the largest font and 6 the smallest.

Value

An object of the same type as x.

Examples


library(htmltools)

p(
  .style %>%
    text_size(1),
  "Largest size"
)

p(
  .style %>%
    text_size(6),
  "Smallest size"
)


cascadess documentation built on Oct. 30, 2024, 9:29 a.m.