Learn R Programming

sass (version 0.4.9)

sass_import: Sass Import

Description

Create an import statement to be used within your Sass file. See https://sass-lang.com/documentation/at-rules/import for more details.

Usage

sass_import(input, quote = TRUE)

sass_file(input)

Value

Fully defined Sass import string.

Arguments

input

Character string to be placed in an import statement.

quote

Logical that determines if a double quote is added to the import value. Defaults to TRUE.

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

Run this code
sass_import("foo")
sass_import("$foo", FALSE)
# \donttest{
tmp_scss_file <- tempfile(fileext = ".scss")
writeLines("$color: red; body{ color: $color; }", tmp_scss_file)
sass_file(tmp_scss_file)
sass(sass_file(tmp_scss_file))
# }

Run the code above in your browser using DataLab