`styles.filter` does not validate against theme.json schema
Description
The Global Styles documentation has theme.json examples that include styles.filter, but that key is nowhere to be found in https://schemas.wp.org/trunk/theme.json causing its inclusion to invalidate the theme.json file.
Step-by-step reproduction instructions
Try to validate this theme.json file, copied (and shortened) from the Global Styles documentation:
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"styles": {
"filter": {
"duotone": "value"
}
}
}
And get a "Property filter is not allowed" notice.
Screenshots, screen recording, code snippet
No response
Environment info
- WordPress 5.9.3
- Gutenberg plugin inactive
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Thanks for pointing this out @ALJ, I think this might be a documentation error. I have never used filter and have no idea what it was intended for. 🤔
Hi @ndiego, this Core Make post from a few months ago mentions this new filter:
The following section documents the changes done to styles in v2: ...
filter: new section to allow themes to attach filters to styles. So far, it only includes theduotonefilter. ...
But I couldn't find any information about what it does 🤷 The best I could find for any help/context is this fullsiteediting.com page. If you search for "filter" on that page, you'll see it. That makes me think it's a legit new key in theme.json, and if so:
- The
theme.jsonschema needs to be updated. - The official documentation needs to be updated to explain what
filteris and why one would use it.