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.
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")
To compile Sass into CSS, provide Sass to the input
argument of the
sass()
function. input
can be any of the following:
list()
defining Sass
variables.sass_file()
, sass_import()
, or sass_layer()
.list()
comprising of all the above.library(sass)
sass(input = "
$size: 50%;
foo { margin: $size * .33; }
")
foo {
margin: 16.5%;
}
See sass’s overview vignette as well as the official Sass documentation.
If you have a question about sass, try asking one on https://community.rstudio.com:
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.