as_sass {sass} | R Documentation |
Converts multiple types of inputs to a single Sass input string for
sass()
.
as_sass(input)
input |
Any of the following:
|
a single character value to be supplied to sass()
.
https://sass-lang.com/documentation/file.SASS_REFERENCE.html#import
# 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)