attr_style: Create the content of the html style attribute

Description Usage Arguments Value Examples

View source: R/attributes.r

Description

Designed to be used together with the tag_attr function.

Usage

1

Arguments

...

named arguments are used as settings in the html style attribute, with the name being the name of the setting (e.g., background-color). All arguments must be vectors of the same length. NA values can be used to ignore a setting, and if all settings are NA then NA is returned (instead of an empty string for style settings).

Value

a character vector with the content of the html style attribute

Examples

1
2
tag_attr(class = c('x','y'),
         style = attr_style(`background-color` = 'rgba(255, 255, 0, 1)'))

tokenbrowser documentation built on Oct. 23, 2020, 6:54 p.m.