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

Audit the components color and use only colors from the palette #666

Open
afercia opened this issue Jul 16, 2018 · 0 comments
Open

Audit the components color and use only colors from the palette #666

afercia opened this issue Jul 16, 2018 · 0 comments
Labels

Comments

@afercia
Copy link
Contributor

afercia commented Jul 16, 2018

We shouldn't ever use hardcoded colors, and always use color variables from the palette as that's the only way to keep colors under control in the long term. For example:

composites/Plugin/SnippetEditor/components/Shared.js > InputContainer uses:

border: 1px solid ${ ( props ) => props.isActive ? "#5b9dd9" : "#ddd" };

===

a few default props in Button.js use "#000"

===

a11y/Styles.js
backgroundColor: "#eeeeee "

===

also hardcoded colors in the styled components are not ideal, for example:

SnippetPreview DesktopContainer:
background-color: white;

SnippetPreview MobileContainer:
border-bottom: 1px hidden #fff

===

About rgba colors, we have a rgba() utility function that should be used instead of hardcoded rgba colors.

===

I guess the only exception is about the colors used for the snippet preview, which mimic the Google ones.

===

If new colors are needed, these should be discussed with the design team for inclusion in the palette.

@afercia afercia added the UI label Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant