rstudio / sass

Sass compiler package for R

Home Page:https://rstudio.github.io/sass/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sass

R build status CRAN_Status_Badge

<style> pre { border: 1px solid #eee; } pre.r { background-color: #ffffff; } pre.r code { background-color: #ffffff; } pre.css { margin-top: -1.25rem; background-color: #f8f8f8; border-radius: 0; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; } </style>

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

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

About

Sass compiler package for R

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

License:Other


Languages

Language:C++ 84.6%Language:R 9.1%Language:C 2.4%Language:Shell 1.8%Language:Makefile 0.7%Language:M4 0.6%Language:Perl 0.4%Language:SCSS 0.2%Language:CSS 0.0%Language:Sass 0.0%