bs_vars_file: Bootstrap variables from a file

Description Usage Arguments Value Examples

View source: R/use_vars_template.R

Description

Bootstrap variables from a file

Usage

1
bs_vars_file(input_file)

Arguments

input_file

Path to SCSS file containing variables to use for creating a theme.

Value

a list that can be used in create_theme.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
my_vars <- file.path(tempdir(), "custom-vars.scss")
my_theme <- file.path(tempdir(), "theme.css")

# Open template and edit variables
use_vars_template(
  output_file = my_vars,
  theme = "flatly"
)

# Create new theme based on the modified template
create_theme(
  theme = "flatly",
  bs_vars_file(input_file = my_vars),
  output_file = my_theme
)


# Clean up
unlink(my_vars)
unlink(my_theme)

fresh documentation built on July 2, 2020, 1:59 a.m.