chromatic-sass icon indicating copy to clipboard operation
chromatic-sass copied to clipboard

Add JS only api to support non-sass environments.

Open foxyblocks opened this issue 8 years ago • 1 comments

The strategy here would be to separate out the color picking logic into a separate modules so they could be used in non sass environments (postcss, css in js, etc...).

Then the sass portion could act as a go between between the base logic and the sass environment, while environments that don't use sass would just use the base apis.

This would be somewhat difficult because currently the base logic depends on several sass APIs and data types.

foxyblocks avatar Apr 21 '17 16:04 foxyblocks

The strategy here would be to separate out the color picking logic into a separate modules so they could be used in non sass environments (postcss, css in js, etc...).

This module is just a wrapper around chroma-js, to make its functions available from sass. So if you're looking for chromatic functions in Javascript (i.e. outside of sass environments), see: https://www.npmjs.com/package/chroma-js

tim-janik avatar Jun 15 '20 12:06 tim-janik