-
Notifications
You must be signed in to change notification settings - Fork 64
Use "background" and "foreground" color slugs instead of "base" and "contrast" for consistency and compatibility #36
Comments
Unfortunately, these slugs have become prevalent. I do agree with @dianeco we mine as well keep it consistent. |
I generally agree with maintaining compat between themes, but I'd much rather suffer a little growing/learning pain now instead of having years of weird and confusing slugs and continuing to propagate their use throughout the theming community. |
I'm just worried we might go down this rabbit hole 🕳️ 🐇 |
"background" is where is goes "contrast" describes purpose for the color and a relationship with the palette "primary" is a lot more like "contrast" than it is "background" I have used "foreground" and "background" for nearly every Theme I've taken part in. Using anything else would feel weird. But I agree that "base" and "contrast" are words that better suit the purpose. I would really really really like those values to be standardized though. |
I don't mind "base" and "contrast". They're a bit abstracted from the elements they're declaring, but I think its fine. Though I'd rather see WordPress using the values within |
I'm not a fan of
However, this is my bigger concern.
Ultimately, I'm swayed by @justintadlock 's reasoning and think this may be a great point to rip the band-aid off 😫 and switch to So, I vote to stick with |
I noticed that the new core site header and footer patterns use the foreground and background color slugs. |
Thanks for highlighting that! Hmm, I'm not sure what the best way to handle the color names is now if the core patterns are using background and foreground. I really like avoiding the use of background and foreground as slugs for the reasons described above, but I think the default theme and core patterns should agree on color naming. It would be great if the core patterns could reference |
We can do it in theme.json, seems logical that the next step is that patterns can do it as well! |
I've created an issue! WordPress/gutenberg#43627 |
Just dropping back here to note that WooCommerce 6.9 Beta has new CSS to try and make the assimilation of block themes a bit more seamless, and there are several references to the following:
You can see more of the changes in the newly added It is nice that there are fallback values (e.g. Also, I know that traditionally a Twenty Twenty-something custom stylesheet is often added to the WooCommerce project for new themes. So, we might want to keep some of this on the radar. Here is a list of the past Twenty Twenty-something stylesheets in WooCommerce: |
Thank you for noting this, @colorful-tones! It's super helpful. 🙇 I'm still unsure of the best color naming for TT3. I prefer our current setup, but I don't want to make things difficult or too different if other prominent areas are using the |
Just my two cents, as I fully agree with what @justintadlock says here:
|
I misunderstood the implications of using the vertical bar syntax and this is not relevant. |
I'm not sure the vertical bar syntax would help in this context, as we'd still only be able to reference the colour palette variable, e.g. Apologies if I've misunderstood here - were you thinking of another way we could use it? |
Ah yes, I figured I was missing some of the understanding around the limitations and usage.
No, and thanks for clarifying. Please disregard my commentary on the possibility of using the vertical bar syntax as it is not relevant to this issue. 👍 |
I think that it's essential to have consistency between themes. Most of the latest block themes are not using If the new default theme uses |
Agreed. |
I really do hope that
|
Agree. Also, embedded in stone and shouted from all of the hilltops! 😃 📢 |
Thanks, all. I appreciate the continued discussion around this. I would also like to stick with the 'base' and 'contrast' names for the same reasons listed above. I really like the idea of encouraging a standardized color naming convention. I've opened an issue here for the theme handbook: WordPress/Documentation-Issue-Tracker#563. Please feel free to edit / let me know if I've missed anything here. |
Closing as the theme has been merged into the WordPress Core SVN repository and is no longer maintained on GitHub. |
Currently, the theme.json declares
base
andcontrast
colors that match the background and text colors of the site. To be consistent with Twenty Twenty-Two, the Colors inside the Figma Styles page, and a majority of themes (Poe, Blockbase, Vivre, Pendant, Extendable, Lyna, Gutenify, eStory, Lawson...), we should consider using thebackground
andforeground
slugs along with the "Background" and "Foreground" names.Moreover, having the same color slugs as Twenty Twenty-Two would allow users to easily switch from Twenty Twenty-Two to Twenty Twenty-Three.
The text was updated successfully, but these errors were encountered: