

# sass 

[![R build
status](https://github.com/rstudio/sass/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rstudio/sass/actions)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/sass)](https://cran.r-project.org/package=sass)

The `sass` R package provides bindings to
[LibSass](https://github.com/sass/libsass), a fast
[Sass](https://sass-lang.com/) 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:

``` r
install.packages("sass")
```

Install the latest development build from GitHub:

``` r
# 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](https://rstudio.github.io/sass/articles/sass.html#variables).
- A `sass_file()`, `sass_import()`, or `sass_layer()`.
- A nested `list()` comprising of all the above.

``` r
library(sass)
sass(input = "
  $size: 50%;
  foo { margin: $size * .33; }
")
```



### Learn more

See **sass**’s [overview
vignette](https://rstudio.github.io/sass/articles/sass.html) as well as
the official [Sass documentation](https://sass-lang.com/documentation/).

### Ask a question

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

[![RStudio Ask a question:
sass](https://img.shields.io/badge/Ask%20a%20question-sass-75aadb.svg?style=popout&logo=data:image/svg+xml;base64, )](https://forum.posit.co/new-topic?title=&category_id=10&tags=sass&body=%0A%0A%0A%20%20--------%0A%20%20%0A%20%20%3Csup%3EReferred%20here%20by%20%60sass%60%27s%20README%3C/sup%3E%0A&u=rich_i)
