Skip to content

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

Closed as not planned

Description

@cchaos

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)

Activity

  1. added
    documentation
    on Oct 20, 2021
  2. davidylee commented on Oct 21, 2021

    @davidylee

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

  3. cchaos commented on Oct 21, 2021

    @cchaos
    ContributorAuthor

    👋 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

  4. github-actions commented on Apr 19, 2022

    @github-actions

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

  5. added
    stale-issue
    on Apr 19, 2022
  6. added and removed
    stale-issue
    on Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions