-
-
Couldn't load subscription status.
- Fork 6.4k
css color reorganising #367
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
Conversation
- store all colors as variables - replaced #f2f2f2 usage with #f0f0f0 as the two shades of gray are almost identical - remove redundant border-color property for the site menu active arrow
|
+1 |
|
Do we really need 8 grays? I understand a brand gray, a dark gray, and a light gray, but is there a need for five additional grays? |
Spot on. |
$gray1 = #ccc
$gray2 = #c0c0c0
$gray3 = #ddd
$gray4 = #eee
$gray5 = #f0f0f0don't really like the variable names. |
Other suggestions are welcome. I would not recommend this variable naming anywhere else, but here are some of the problems I have encountered specifically with css color variable naming. I can alleviate these somewhat by reducing the number of grays down from 8, but you still run into the same problems even with only a few variants of the same color.
|
|
This raises the need for some CSS cleanup which we haven't addressed yet, since we until recently, have been waiting for things to settle. We have probably ended up with so many grays because no one has taken a look across all pages and decided (with a strict mindset) which grays we really need. I would be much more positive to a strict refactor of colors, rather than encourage more colors to be added. |
|
The number of blacks and grays used on the site has dropped from 12 to 6 (though in the file diff it looks like an increase as many of them were not defined as variables). If you feel this can be trimmed further please submit a pull request after this. |
Sounds like a good effort in the right direction! LGTM now 👍 |
|
LGTM. |
|
Definitely looks better 👍 |
This is useful for when adding new features to the site you do not have to scan around the
.stylfiles to see if an appropriate color already exists#f2f2f2usage with#f0f0f0as the two shades are almost identicalborder-colorproperty for the site menu active triangleThe variable naming is not imaginative but, having worked on a code base that had 25+ shades of grey, coming up with names like
light-gray,lighter-gray,lightest-gray,border-gray3becomes tiresome and has little value over time. Having said that I have left some of the existing variable names as people may be familiar with them.