README.md

cascadess

Lifecycle: maturing r-cmd-check codecov CRAN status

A style pronoun and utilities for {htmltools} tags.

What can I use cascadess for?

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.

Why a pronoun?

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

Usage

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

Installation

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


Try the cascadess package in your browser

Any scripts or data that you put into this service are public.

cascadess documentation built on Jan. 13, 2021, 5:10 p.m.