A style pronoun and utilities for {htmltools} tags.
Most importantly, cascadess's styles can be used with any shiny related package and are designed to not clash with or overwrite existing CSS styles.
Cascadess defines a style pronoun, .style
, usable inside htmltools::tags
HTML builder functions. With .style
you can specify styling directly within
the builder function call, which helps the reader immediately understand how the
HTML tag element is styled. Without the .style
pronoun, styling is applied
after the function call, e.g div() %>% margin() %>% background()
.
library(htmltools)
library(cascadess)
div(
.style %>%
margin(2) %>%
border("indigo") %>%
shadow("medium"),
p("Fusce sagittis, libero non molestie mollis, magna",
"orci ultrices dolor, at vulputate neque nulla lacinia eros.")
)
The cascadess()
function must be included in a UI so the necessary CSS files
are found.
ui <- list(
cascadess(),
h4(
.style %>%
font(case = "upper") %>%
border(bottom = "red"),
"Etiam vel tortor sodales tellus ultricies commodo."
)
)
The stable version may be installed from CRAN.
install.packages("cascadess")
The development version may be installed from the master branch.
## install.packages("devtools")
devtools::install_github("nteetor/cascadess")
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.