-
Notifications
You must be signed in to change notification settings - Fork 42
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
Theme handbook: color naming best practices #563
Comments
I'd like to take this on if that works for you, @mikachan If you have done any work on this already just let me know. |
Yes, that's fine with me! Please let me know if I can help/review. |
From this issue, I'm going to suggest that we add a short snippet about base and contrast being recommended as the minimum for the color palette here I'm torn about investing the effort, small as it is, to implement it on the block editor handbook side(which are the links mentioned above). ideally, we should promote the Theme Developer Handbook over Block Editor for most developers. In any case, the issue for changes to the Block Editor Handbook will need to be in the Gutenberg Repo with a corresponding PR. Happy to hear any other thoughts on this, but this seems pretty straight forward from a Theme handbook perspective. Will come back around with some copy to suggest. |
I think the page and the section you linked to is a good place to add it. |
Heads up @kafleg @carolinan @TeBenachi - the "themes" label was applied to this issue. |
I agree, the Theme Developer Handbook page makes sense 👍 |
Here's what I'm thinking, would love feedback on the phrasing and inclusion within the Color palette section. I am not necessarily tied to anything in the phrasing but wanted to get something in here for feedback.
|
I like it. |
Sure I may be able to rework some of what @mikachan put in the original comment |
Perhaps separating the concerns a bit to reduce potential confusion for folks: "...include colors with the slug |
I agree that is more clear, thank you. I'm still pondering the expansion of this to include the "why not these other things" section. Right now it feels to me that the ideal would be something short that links out to something more detailed along the code standards vein... |
I have a small reservation about the use of primary in "..,and |
Leaving this here for my own reference. Thanks, @richtabor fie both writing and updating the post. https://richtabor.com/standardizing-theme-json-colors/ Editing to add this relevant issue for future reference WordPress/gutenberg#48228 |
Good point. Perhaps 'main' is better. "...include colors with the slug base for the background of your site, and contrast for the main text color" |
Here's what I'm thinking right now about moving forward with this issue. Let's wrap up this issue to address just the naming convention with this copy:
As a follow-up, I believe a new issue should be created for adding more detail about recommendations for using more semantic slugs My opinion is that a mention of good/bad slug names should be linked out to another page with a more complete explanation that might be more broadly applied since slug names are used across all presets in theme.json. |
What's the best way to get this change pushed live? I already have access to publish directly on developer.wordpress.org but want to ensure I follow protocol. @carolinan, can you advise? |
@carolinan I've scheduled this change to go live in one week, allowing plenty of time for review. Feel free to trigger it to publish sooner if you agree with the change as it has been implemented. https://developer.wordpress.org/wp-admin/post.php?post=144996&action=edit |
Published. |
What is the new page you are requesting?
It may not require an entirely new page, but it would be great to include a section which encourages the use of a standardized naming convention for theme colors.
It could work well in a new section here, on the theme.json page: https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/#css-custom-properties-presets-custom
Or perhaps on this page: https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#block-color-palettes
How will this new page help you?
This has been brought up as part of the development of the Twenty Twenty-Three default theme: WordPress/twentytwentythree#36 (comment)
Twenty Twenty-Three uses the names 'base' and 'contrast' for its main contrasting colors, and as preferrable alternatives to 'background' and 'foreground'. There is more information for the reasoning in this discussion, but to summarise:
Note that it's probably best to update the handbook with these changes only once Twenty Twenty-Three has been released.
The text was updated successfully, but these errors were encountered: