Collects SASS variable overrides – from a designer's exported sheet, from
..., or both – for bootstrap_dep() to compile against the Bootstrap
tree bootstrict vendors. Variables from variables are merged with (and
overridden by) any passed through ....
Arguments
- ...
Named SASS variables, e.g.
primary = "#ff6600". Names use the Bootstrap convention without the leading$.- variables
Optional path to a
.scssvariable sheet, or a named list (as returned byparse_scss_variables()).
Details
Values are placed in the SASS layer that can actually compile them. A value
built only from literals or from the sheet's own variables ($primary: #ff6600, $link-color: $primary) goes to the defaults layer, where it is
set before Bootstrap derives $theme-colors and the rest from it. A value
referring to one of Bootstrap's own variables ($link-hover-color: shade-color($primary, 20%), with no $primary in the sheet) cannot go
there – Bootstrap's variables are not defined yet – so it goes to the
declarations layer, after the configuration block.
One consequence is worth knowing: a theme colour redefined from one of
Bootstrap's own variables ($secondary: $gray-600) lands in the
declarations layer, after $theme-colors has been built, so it will not
restyle .btn-secondary. Give the sheet its own literal (or define the
variable it refers to) when that matters.