-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[APM] EUI should export hex values instead of rgb() values #30195
Comments
Pinging @elastic/apm-ui |
@sqren Should this perhaps be moved to the EUI repo? |
@sqren I missed your comment about taking it in only in APM, carry on 👍 |
"if we want this solved we should take it on" I assumed @sqren meant that we should take it on to change this in EUI, in which case this is still probably an EUI repo issue, right? Would be nice to have it there and then the EUI team can comment on whether hex should replace rgba or be offered in addition to rgba etc... |
I'll move this to EUI. |
Replace by elastic/eui#1588 |
Not all EUI components accept rgb values and we therefore have to convert the rgb colors we get from EUI to hex.
This is an additional step and it would make more sense if the colors were hex in the first place.
This is only concerning APM and Infra at the moment so if we want this solved we should take it on.
SCSS variables are exported 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 thesass-extract-js
pluginWe 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
The text was updated successfully, but these errors were encountered: