Child of #3217923: [Plan] Organize and refactor CSS color variables for Olivero
Problem
Olivero's colors naming is all over the place.
- Primary colors are namespaced
--blue. We will switch this to--primary - There are duplicate or extremely similar colors in both the primary and gray palettes. We will consolidate these.
- The number at the end of the colors does not always indicate its luminosity. We will change this value to reflect its luminosity (round it up to the nearest 5th)
For example, --color--blue-20 will correspond to hsl(202, 79%, 38%). This means that its updated variable name can be something like --color--primary-40.
Plan
I worked with Olivero designer @jwitkowski79 to create this plan to rename and consolidate the colors:
Primary colors:
--color--blue-10 (luminosity 32%) 👉 --color--primary-30
--color--blue-20 (luminosity 38%) 👉 --color--primary-40
--color--blue-30 (luminosity 50%) 👉 --color--primary-50 (deleting this - duplicate color variable)
--color--blue-50 (luminosity 50%) 👉 --color--primary-50
--color--blue-70 (luminosity 62%) 👉 --color--primary-60
--color--blue-90 (luminosity 93%) 👉 not used (remove it)Grays
--color--gray-0 (luminosity 6%) 👉 --color--gray-5 (this will be consolidated to --color--gray-5)
--color--gray-5 (luminosity 5%) 👉 --color--gray-5 (no change)
--color--gray-8 (luminosity 11%) 👉 --color--gray-10
--color--gray-10 (luminosity 20%) 👉 --color--gray-20
--color--gray-20 (luminosity 44%) 👉 --color--gray-45 (deleting this and consolidating to --color--gray-45)
--color--gray-25 (luminosity 44%) 👉 --color--gray-45
--color--gray-28 (luminosity 55%) 👉 --color--gray-60 (deleting this and consolidating to --color--gray-60)
--color--gray-30 (luminosity 57%) 👉 --color--gray-60
--color--gray-40 (luminosity 66%) 👉 --color--gray-65 (deleting this and consolidating to --color--gray-65)
--color--gray-45 (luminosity 72%) 👉 --color--gray-70
--color--gray-50 (luminosity 63%) 👉 --color--gray-65
--color--gray-70 (luminosity 88%) 👉 --color--gray-90
--color--gray-75 (luminosity 89%) 👉 --color--gray-90 (deleting this and consolidating to --color--gray-90)
--color--gray-80 (luminosity 93%) 👉 --color--gray-95
--color--gray-90 (luminosity 96%) 👉 --color--gray-100 (deleting this and consolidating to --color--gray-100)
--color--gray-95 (luminosity 97%) 👉 --color--gray-100Testing instructions
There should be no visual changes with this patch. Basically, you'll need to look through the site and make sure that nothing has changed :)
You can find Tugboat previews to compare at:
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | interdiff-11-14.txt | 976 bytes | mherchel |
| #14 | 3217926-14.patch | 114.62 KB | mherchel |
Issue fork drupal-3217926
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mherchel#3217924: Olivero: Convert all colors (blues and grays) to HSL and normalize hues and saturations. is committed. Un-postponing!
Comment #4
mherchel💩. Opened up the branch against 9.4. This needs to be 10.0.x
Comment #5
mherchelThis MR system is really sucking for me right now. Switching back to patches for this issue.
Comment #6
mherchelI had a meeting with @jwitkowski79, and we created a plan. Updating summary.
Comment #7
mherchelComment #8
jwitkowski79 commented@mherchel, in the list above, I noticed that --color--gray-20 and --color--gray-25 are the same color. I think we had agreed to remove --color--gray-20
Comment #9
mherchelYep! They were mapped properly, I just missed adding the "deleting this.." comment. Fixed!
Comment #10
jwitkowski79 commented@mherchel All set! This looks good.
Comment #11
mherchelPatch attached! Tugboat preview is at https://3217926-rename-colors-cnithqq9zruywmuzazr54l6x9o72ohkh.tugboat.qa/
Comment #12
mherchelAdding testing instructions to summary
Comment #13
andy-blumWent through all .pcss.css files and the re-namings seem correct, .css files didn't yield any additional changes when I rebuilt them, so I assume they're good as well. The only comment I'd add is that the comment above defining the --color--primary-X variables we're still calling it "blue colors". Should we refer to it as "Theme primary colors" instead?
Comment #14
mherchelD'oh! You're 100% correct. New patch and interdiff attached! Thank you!
Comment #15
andy-blumDo we need the color names in comments here? The seem unnecessary at best now that our variable names are a little more semantic, and switching back and forth between gray and black, as well as continuing to use "blue" here seems like it could lead to confusion.
Comment #16
mherchelI would say yes. Right now they're in use within the Figma docs, and they help me reconcile the two colors.
That being said, these will likely change or be removed with the work from #3257284: Create designs for secondary color for Olivero
Comment #17
andy-blumIn that case everything else seems in order. RTBC.
Comment #18
mherchelCreated followup #3260118: No differentiation in background color between the hover and drag states within tabledrag
Comment #20
lauriiiCommitted fc00e0c and pushed to 10.0.x. Thanks!