sass-to-js is API to read Sass variables from JavaScript.
It provides Sass methods to save Sass maps and list as JSON to CSS and
JavaScript helpers to read those strings from CSS to JavaScript objects.
It requires no dependencies!
You can use it e.g. for passing data from Sass to JS like:
- media breakpoints list to reuse in JavaScript/HTML (e.g. in responsive image solutions)
- some variables values (e.g. theme colors, dimensions etc.)
- list of variable values which might be applied in some circumstances (columns count for different types of devices etc.)
- to test your Sass code/framework with JavaScript
via bower + ToDo publish via npm + ToDo publish
How to use in scss in js in jquery in AngularJS Describe params and debug Can be use as CommonJS/RequireJS modules
link to article demo + codepen
MIT
ToDo: Travis test