Skip to content

Allow theme variables to be modified from outside #8

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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