Syntactically Awesome Style Sheets ('Sass')

An 'SCSS' compiler, powered by the 'LibSass' library. With this, R developers can use variables, inheritance, and functions to generate dynamic style sheets. The package uses the 'Sass CSS' extension language, which is stable, powerful, and CSS compatible.


sass

R buildstatus CRAN_Status_Badge


The sass R package provides bindings to LibSass, a fast Sass compiler written in C++. Sass is a mature and stable CSS extension language that makes styling modern websites less complex and more composable.

Installation

Install the released version of sass from CRAN:

install.packages("sass")

Install the latest development build from GitHub:

# install.packages("remotes")
remotes::install_github("rstudio/sass")

Basic usage

To compile Sass into CSS, provide Sass to the input argument of the sass() function. input can be any of the following:

  • An R string (as in the example below).
  • A named list() defining Sass variables.
  • A sass_file(), sass_import(), or sass_layer().
  • A nested list() comprising of all the above.
library(sass)
sass(input = "
  $size: 50%;
  foo { margin: $size * .33; }
")

Learn more

See sass’s overview vignette as well as the official Sass documentation.

Ask a question

If you have a question about sass, try asking one on https://forum.posit.co:

RStudio Ask a question:sass

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("sass")

0.4.10 by Carson Sievert, 2 years ago


https://rstudio.github.io/sass/, https://github.com/rstudio/sass


Report a bug at https://github.com/rstudio/sass/issues


Browse source code at https://github.com/cran/sass


Authors: Joe Cheng [aut] , Timothy Mastny [aut] , Richard Iannone [aut] , Barret Schloerke [aut] , Carson Sievert [aut, cre] , Christophe Dervieux [ctb] , RStudio [cph, fnd] , Sass Open Source Foundation [ctb, cph] (LibSass library) , Greter Marcel [ctb, cph] (LibSass library) , Mifsud Michael [ctb, cph] (LibSass library) , Hampton Catlin [ctb, cph] (LibSass library) , Natalie Weizenbaum [ctb, cph] (LibSass library) , Chris Eppstein [ctb, cph] (LibSass library) , Adams Joseph [ctb, cph] (json.cpp) , Trifunovic Nemanja [ctb, cph] (utf8.h)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports fs, rlang, htmltools, R6, rappdirs

Suggests testthat, knitr, rmarkdown, withr, shiny, curl

System requirements: GNU make


Imported by GRShiny, bslib, bslibdash, commons, connectwidgets, flexdashboard, fresh, gt, juicedown, kinesis, minidown, omsvg, rhino, rstudiothemes, shinyWidgets, shinyglass, shinymaterial.

Suggested by JuliaCall, aNCA, brand.yml, crosstalk, geommc, golem, gtExtras, knitr, leprechaun, monaco, pkgdown, rmarkdown, shiny, shiny.fluent, shinyCohortBuilder.


See at CRAN