-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Map color presets like spacing presets for improved theme interoperability #53996
Comments
I think something like this has been proposed a few different times, most notably in: I would love to see this idea get more traction. Standardizing these could actually make the pattern directory useful for themes with strict design requirements. |
I don’t think the terms matter that much. If the -1, -2, -3 fallback mechanism was in place (for any color preset potentially) we don’t have to be so prescriptive, as most of those ideas lean that direction. |
The terms have been what's always made me stumble here, i.e. as soon as we canonize a term we're stuck with it, and it's been very hard to get people to agree on which terms to then go with. So to be sure I'm getting this right, you're suggesting that, if a pattern leverages Edit: to be clear, |
Yes, like how spacing presets work basically.
If a theme is using more "custom" color slugs, I don't know that we could map them effectively without some heavy lifting. |
To me that seems like a valuable small step forward, that doesn't require us to canonize any terms 👍 👍 |
Small, but relevant:
… and if there is no |
Thought of a potential avenue for improving how colors map across themes/variations.
The way I proposed colors for Twenty Twenty Four (WordPress/twentytwentyfour#106) is to provide variants of
base
,contrast
andaccent
. These represented asbase-2
,contrast-2
,accent
,accent-2
,accent-3
, etc.What if we treated these values like we do the spacing scale?
If there is no
accent-3
registered, it will resolve toaccent-2
instead — and if there is noaccent-2
, fallback toaccent-1
.The same would follow for base and contrast colors.
This way themes (and style variations) would be much more interoperable — instead of today, where if you use a color preset that does not map to a newly applied theme.json set, the color applied is missing completely. With this proposal, that would be the last-case fallback — after first checking for related alternatives.
The text was updated successfully, but these errors were encountered: