Create an import statement to be used within your Sass file. See https://sass-lang.com/documentation/at-rules/import for more details.
Details
sass_file() adds extra checks to make sure an appropriate file path
exists given the input value.
Note that the LibSass compiler expects .sass files to use the Sass Indented Syntax.
Examples
sass_import("foo")
#> [1] "@import \"foo\";"
sass_import("$foo", FALSE)
#> [1] "@import $foo;"
# \donttest{
tmp_scss_file <- tempfile(fileext = ".scss")
writeLines("$color: red; body{ color: $color; }", tmp_scss_file)
sass_file(tmp_scss_file)
#> [1] "@import \"/tmp/Rtmp2YrjTd/file1edb219dfc4a2.scss\";"
#> attr(,"class")
#> [1] "sass_file" "character"
#> attr(,"sass_file_path")
#> [1] "/tmp/Rtmp2YrjTd/file1edb219dfc4a2.scss"
sass(sass_file(tmp_scss_file))
#> /* CSS */
#> body {
#> color: red;
#> }
#>
# }