background_color {cascadess} | R Documentation |
Change background color
Description
The background_color()
and background_subtle()
functions adjust the
background color of a tag element.
Usage
background_color(x, color)
background_subtle(x, color)
Arguments
x |
A tag element or .style pronoun. |
color |
A character string specifying a color. One of,
|
Value
An object of the same type as x
.
Examples
library(htmltools)
div(
.style %>%
background_color(theme_primary()),
"Primary background"
)
div(
.style %>%
background_color(theme_danger()),
"Danger background"
)
div(
.style %>%
background_subtle(theme_warning()) %>%
border_subtle(theme_warning()) %>%
text_emphasis(theme_warning()),
"Warning!"
)
div(
.style %>%
background_subtle(theme_dark()) %>%
border_subtle(theme_dark())
)
[Package cascadess version 0.2.0 Index]