Skip to content

Allow theme variables to be modified from outside #8

@bebraw

Description

@bebraw

Got this tip from @Morhaus:

sass.renderSync({
  data: '$foo: getVar("foo")',
  functions: {
    'getVar($varname)': function(varname) {
      var varname = varname.getValue();
      return sass .types.{String,Color,Number}(vars[varname]);
    },
  }
});

Alternatively we could do something more generic like use templating for variables files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions