text_size {cascadess}R 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"
)


[Package cascadess version 0.2.0 Index]