Learn R Programming

tokenbrowser (version 0.1.6)

attr_style: Create the content of the html style attribute

Description

Designed to be used together with the tag_attr function.

Usage

attr_style(...)

Value

a character vector with the content of the html style attribute

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).

Examples

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

Run the code above in your browser using DataLab