Skip to content
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

Add missing value to CSS font-display descriptor in theme.json #44622

Merged

Conversation

pagelab
Copy link
Contributor

@pagelab pagelab commented Sep 30, 2022

What?

The “optional” value for the CSS font-display descriptor is missing from theme.json (see below). This PR simply adds it.

Screen-Shot-2022-09-30-13-56-12

Why?

The value is part of the CSS fonts spec, and it's recommended for body text, where a custom font is not absolutely required to load on the first visit and can be safely seen only on subsequent page loads.

How?

The theme.json schema was manually updated with the missing value.

Testing Instructions

  1. Open any theme.json file, from any block theme, on VS Code.
  2. Go to the fontFamilies section and add a fontDisplay definition.
  3. Add a new value and see that “optional” appears.
  4. Check the front-end code to see if the value was correctly applied to the font-face property.

2022-09-30 15 54 26

@pagelab pagelab requested a review from ajlende as a code owner September 30, 2022 18:56
@pagelab pagelab changed the title Add missing value to fontDisplay descriptor in theme.json Add missing value to CSS font-display descriptor in theme.json Sep 30, 2022
@carolinan carolinan merged commit 1104c68 into WordPress:trunk Oct 3, 2022
@github-actions github-actions bot added this to the Gutenberg 14.3 milestone Oct 3, 2022
aristath added a commit that referenced this pull request Oct 3, 2022
@aristath
Copy link
Member

aristath commented Oct 3, 2022

Thank you for this PR!
I backported it to the WIP refactor on #43492 as well, so we don't miss it when the time comes for that PR 👍

@pagelab pagelab deleted the update/theme-json-schema-font-display branch October 3, 2022 15:52
aristath added a commit that referenced this pull request Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants