Skip to content
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

Closed
sorenlouv opened this issue Feb 6, 2019 · 6 comments
Closed

[APM] EUI should export hex values instead of rgb() values #30195

sorenlouv opened this issue Feb 6, 2019 · 6 comments
Labels
Team:APM - DEPRECATED Use Team:obs-ux-infra_services.

Comments

@sorenlouv
Copy link
Member

sorenlouv commented Feb 6, 2019

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 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

@sorenlouv sorenlouv added Team:APM - DEPRECATED Use Team:obs-ux-infra_services. [zube]: Inbox labels Feb 6, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui

@formgeist
Copy link
Contributor

@sqren Should this perhaps be moved to the EUI repo?

@formgeist
Copy link
Contributor

@sqren I missed your comment about taking it in only in APM, carry on 👍

@jasonrhodes
Copy link
Member

"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...

@sorenlouv
Copy link
Member Author

I'll move this to EUI.

@sorenlouv
Copy link
Member Author

sorenlouv commented Feb 22, 2019

Replace by elastic/eui#1588

@zube zube bot added [zube]: Done and removed [zube]: Inbox labels Feb 22, 2019
@zube zube bot reopened this Feb 22, 2019
@zube zube bot added [zube]: Inbox and removed [zube]: Done labels Feb 22, 2019
@zube zube bot closed this as completed Feb 22, 2019
@zube zube bot added [zube]: Done and removed [zube]: Inbox labels Feb 22, 2019
@zube zube bot reopened this Feb 22, 2019
@zube zube bot added [zube]: Inbox and removed [zube]: Done labels Feb 22, 2019
@zube zube bot closed this as completed Feb 22, 2019
@zube zube bot added [zube]: Done and removed [zube]: Inbox labels Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:APM - DEPRECATED Use Team:obs-ux-infra_services.
Projects
None yet
Development

No branches or pull requests

5 participants