R/cascadess.R

Defines functions cascadess

Documented in cascadess

#' @import rlang
#' @importFrom crayon
#'   red bold
NULL

## nocov start

#' Cascadess
#'
#' @description
#'
#' Styles for htmltools tags.
#'
#' For styles to be applied you must include a call to `cascadess()` in your
#' shiny application or htmltools tags.
#'
#' @export
#' @examples
#'
#' \dontrun{
#' library(shiny)
#'
#' shinyApp(
#'   ui = list(
#'     cascadess(),
#'     div(
#'       .style %>%
#'         padding(3) %>%
#'         background("indigo") %>%
#'         font("light"),
#'       "Etiam laoreet quam sed arcu."
#'     )
#'   ),
#'   server = function(input, output) {
#'
#'   }
#' )
#' }
#'
cascadess <- function() {
  htmltools::htmlDependency(
    name = "cascadess",
    version = utils::packageVersion("cascadess"),
    src = c(
      file = system.file("www/cascadess", package = "cascadess"),
      href = "cascadess/cascadess"
    ),
    stylesheet = "cascadess.min.css"
  )
}

## nocov end

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.