Description Usage Arguments Details Value See Also Examples
Converts multiple types of inputs to a single Sass input string for
sass
.
1 | as_sass(input)
|
input |
Either a
|
Note that the LibSass compiler expects .sass files to use the Sass Indented Syntax.
a single character value to be supplied to sass
Visit https://sass-lang.com/documentation/file.SASS_REFERENCE.html#import for more details.
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 | # Example of regular Sass input
as_sass("body { color: \"blue\"; }")
# There is support for adding variables
as_sass(
list(
list(color = "blue"),
"body { color: $color; }"
)
)
# Add a file name
someFile <- tempfile("variables")
# Overwrite color to red
write("$color: \"red\";", someFile)
input <-
as_sass(
list(
list(color = "blue"),
sass_file(someFile),
"body { color: $color; }"
)
)
input
# The final body color is red
sass(input)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.