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

[discussion] css color keywords recommended or not? #71

Closed
gemwuu opened this issue May 22, 2018 · 4 comments
Closed

[discussion] css color keywords recommended or not? #71

gemwuu opened this issue May 22, 2018 · 4 comments

Comments

@gemwuu
Copy link

gemwuu commented May 22, 2018

According to W3 docs, we can, at least, use 17 basic css color keywords. Are there any pros or cons using these keywords?

@ljharb
Copy link
Collaborator

ljharb commented May 22, 2018

Using color keywords makes making slight tweaks very difficult; being precise with the color values is also more readable imo (with a color keyword, you often have to look up the color code - so why not just start with the color code?)

@gemwuu
Copy link
Author

gemwuu commented May 23, 2018

On the contrary, I think using color keywords makes code more readable. Say, red equals #FF0000 and rgb(255,0,0).

@ljharb
Copy link
Collaborator

ljharb commented May 23, 2018

For "red", perhaps, but do you really know exactly what color teal or fuschia is off the top of your head?

If you always have to just "know" that "red equals #FF000", then why not put #FF000 in the code directly?

@gemwuu
Copy link
Author

gemwuu commented May 23, 2018

Good point, will close this issue directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants