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

[Docs] Use consistent casing when outputting hex values #5287

Closed
cchaos opened this issue Oct 20, 2021 · 3 comments
Closed

[Docs] Use consistent casing when outputting hex values #5287

cchaos opened this issue Oct 20, 2021 · 3 comments
Labels
documentation Issues or PRs that only affect documentation - will not need changelog entries good first issue

Comments

@cchaos
Copy link
Contributor

cchaos commented Oct 20, 2021

I noticed that all the hex colors for CSS-in-JS are in uppercase:

Screenshot 2021-10-20 at 13 45 55

For Sass they're in lowercase:

Screenshot 2021-10-20 at 13 45 48

In the "Global values" page, the hex values are also in uppercase:

Screenshot 2021-10-20 at 13 48 33

But in "Theme provider" page they're in lowercase:

Screenshot 2021-10-20 at 13 48 23

Should we only stick to one letter case? If I had to choose I would prefer the lowercase. I think it has better readability.

Originally posted by @miukimiu in #5283 (review)

@cchaos cchaos added documentation Issues or PRs that only affect documentation - will not need changelog entries assign:anyone good first issue labels Oct 20, 2021
@davidylee
Copy link

Hi @cchaos , would this just entail changing them all to lowercase? I can take it up! :-) relatively new to open source contribution..

@cchaos
Copy link
Contributor Author

cchaos commented Oct 21, 2021

👋 Hi @davidylee . I've talked this over with @miukimiu and we've actually decided that we should stick with uppercase because all our source code and our sass-linter is uppercase. The main issue here is in the functions that we use to output them in our docs.

For example

For Sass they're in lowercase

We pull in these values from the JSON files here: https://github.com/elastic/eui/tree/master/src-docs/src/views/theme/_json which are compiled from our Sass via this script https://github.com/elastic/eui/blob/master/scripts/compile-scss.js. For some reason the script returns a lowercased version of the hex values. We should find a way to convert them to uppercase.

But in "Theme provider" page they're in lowercase

These are actually hard-coded directly in the examples found in this file: https://github.com/elastic/eui/blob/7a130d52c9dfc7633e94e3f2978dd413e16bfe8e/src-docs/src/views/theme/computed.tsx

@github-actions
Copy link

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

@daveyholler daveyholler closed this as not planned Won't fix, can't repro, duplicate, stale Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues or PRs that only affect documentation - will not need changelog entries good first issue
Projects
None yet
Development

No branches or pull requests

3 participants