-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathREADME.Rmd
92 lines (65 loc) · 4.22 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
output:
github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
# sass <a href='https://rstudio.github.io/sass/'><img src='man/figures/logo.svg' align="right" height="139" /></a>
[](https://github.com/rstudio/sass/actions)
[](https://cran.r-project.org/package=sass)
<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>
```{r setup, include=FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
message = FALSE,
out.width = "100%",
class.output = "css",
comment = ""
)
```
<br>
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://community.rstudio.com>:
[](https://community.rstudio.com/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)