-
Notifications
You must be signed in to change notification settings - Fork 863
Description
The json file that is used by consumers who use css-in-js exports colors as rgb. This is different from the colors exported by sass which is hex.
Not all EUI components accept rgb values css-in-js consumers have to convert the rgb colors to hex. This is an additional step and it would make more sense if the exported colors were hex in the first place.
Notes to aid in implementing the change
Script that exports SCSS variables as json
https://github.com/elastic/eui/blob/master/scripts/compile-scss.js
How to run the export script (in EUI repo)
node scripts/compile-scss.js
Colors are converted to rgb in the sass-extract-js plugin
We can fork this plugin, and change it to export hex
https://github.com/adamgruber/sass-extract-js/blob/master/lib/transformVars.js#L37-L45
Sasscolor format (used in sass-extract-js)
https://github.com/jgranstrom/sass-extract#sasscolor