-
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
Update theme.json
docs for WordPress 5.8
#33131
Conversation
The settings section has the following structure: | ||
|
||
{% codetabs %} | ||
{% WordPress %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about naming this "WordPress 5.8" instead.
The reason I didn't was that I believe this text has to be a single string without spaces. When I introduced the "Input"/"Output" for sections like this one https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/#css-custom-properties-presets-custom I have a vague memory of having used "theme.json"/"CSS styles" and that it was problematic. Will look it up to confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#28655 illustrates what happened when using spaces in the codetabs texts.
|
||
### Settings | ||
|
||
<div class="callout callout-alert"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be styled as a callout.
@@ -462,8 +511,81 @@ Note that the name of the variable is created by adding `--` in between each nes | |||
|
|||
### Styles | |||
|
|||
<div class="callout callout-alert"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be styled as a callout.
@@ -702,6 +826,10 @@ h3 { | |||
|
|||
### customTemplates | |||
|
|||
<div class="callout callout-alert"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be styled as a callout.
@@ -727,6 +855,10 @@ Within this field themes can list the custom templates present in the `block-tem | |||
|
|||
### templateParts | |||
|
|||
<div class="callout callout-alert"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be styled as a callout.
theme.json
docs for 5 8theme.json
docs for WordPress 5.8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for these updates. They look good to me 👍
"duotone": [], | ||
"gradients": [], | ||
"link": false, | ||
"palette": [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be helpful to define a preset like a color so people know how to do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a section fully focused on presets.
Part of #20331
WordPress 5.8 comes with support for
theme.json
, so we need to update the docs accordingly: remove references to "experimental", highlight which parts only work on Gutenberg vs WordPress 5.8, etc.See the document.
Note that there're a few call-outs that will be displayed differently in the block editor handbook. For reference, this is how the current call-out looks: