chroma icon indicating copy to clipboard operation
chroma copied to clipboard

Deprecate global $chroma variable

Open JohnAlbin opened this issue 8 years ago • 0 comments

Currently, libSass has no way to access a global Sass variable from the JavaScript side.

So while libSass allows functions to be written in JS, the JS can only access the functions parameters and cannot access any global Sass properties, like variables, mixins, extends, etc.

So the only way the JavaScript side can access Chroma's variables is by explicitly passing the $chroma global variable into the Sass function.

There are open issues for this in the libSass and node-sass queues. https://github.com/sass/node-sass/issues/1297 https://github.com/sass/libsass/issues/1950

Until that is fixed upstream, Chroma must continue to require explicit use of the global $chroma variable in its code examples.

JohnAlbin avatar Apr 01 '16 13:04 JohnAlbin