-
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
Webfonts API: Document fontFace
and it’s values in theme.json
schema
#41844
Conversation
theme.json
schematheme.json
schema
theme.json
schemafontFace
and it’s values in theme.json
schema
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 is a great addition :) Added one comment. But that can also happen in a follow up 👍
It would be great if this could be backported to wp/6.0 too. Happy to create a second PR for that. |
@adamziel, I think this needs to be backported so that the schema URL is correctly resolved. It's not a blocker for a minor release. |
…ema (#41844) * Document fontFace and it’s values in theme.json schema * npm run docs:build * Fully document all options * required & additionalProperties placed incorrectly * Missing properties and small fixes * Remove extra space * Font-weight is not required * Font weight can be either a string or an integer
I just cherry-picked this PR to the wp/6.0 branch to get it included in the next release: 6a79add |
What?
Document the
fontFace
properties that we introduced in WordPress 6.0 as part of the WebFonts API.Why?
Because there is no documentation.
How?
By including the basic technical documentation to the
theme.json
schema.Testing Instructions
Create a
theme.json
and paste the following in the code. Currently, it says that thefontFace
is not allowed. Replacehttps://schemas.wp.org/trunk/theme.json
withhttps://raw.githubusercontent.com/grappler/gutenberg/schema-fontFace/schemas/json/theme.json
to test changes.`theme.json` code
Screenshots