Learn R Programming

cascadess (version 0.1.0)

style-pronoun: Style pronoun

Description

The .style pronoun allows you to define styles for a tag element within the context of the element. Without the .style pronoun tag styles are applied outside and after constructing a tag element.

div(". . .") %>% background("primary") %>% display("flex")

However, once the content of a tag element grows to more than a few lines, associating the element's styles with the element becomes less and less intuitive. In these situations, make use of the .style pronoun.

div(
  .style %>%
    border("primary") %>%
    font("primary"),
  p(". . ."),
  p(". . .")
)

Usage

.style

Arguments

Prefixing

Complex components such as shiny::radioButtons() or yonder::listGroupInput() may need a non-standard prefix for the CSS classes applied by cascadess' functions.