sass v0.3.0

0

Monthly downloads

0th

Percentile

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.

Readme

sass

R build status 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 composible.

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; }
")
foo {
  margin: 16.5%;
}

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://community.rstudio.com:

RStudio Ask a question:
sass

Functions in sass

Name Description
sass_cache_options Caching Options for Sass (defunct)
sass_cache_get Get default sass cache object for the current context
sass Compile Sass to CSS
as_sass List to Sass converter
sass-deprecated Deprecated
sass_cache_context_dir Return the cache directory for the current context.
as_sass_layer Sass Bundle to Single Sass Layer
output_template An intelligent (temporary) output file
FileCache Create a file cache object
sass_cache_get_dir Get and set the cache object registered for a specific directory
sass_file_cache Create a file cache object
sass_partial Compile rules against a Sass Bundle or Sass Layer object
sass_options Compiler Options for Sass
sass_layer Bundling Sass layers
sass_import Sass Import
write_file_attachments Write file attachments from a sass theme object
No Results!

Vignettes of sass

Name
color-contrast.scss
my-style.png
my-style.scss
sass.Rmd
No Results!

Last month downloads

Details

Type Package
License MIT + file LICENSE
URL https://github.com/rstudio/sass
BugReports https://github.com/rstudio/sass/issues
Encoding UTF-8
LazyData true
RoxygenNote 7.1.1
SystemRequirements GNU make
VignetteBuilder knitr
NeedsCompilation yes
Packaged 2021-01-12 16:23:33 UTC; cpsievert
Repository CRAN
Date/Publication 2021-01-13 11:00:03 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/sass)](http://www.rdocumentation.org/packages/sass)