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

Move the style variation specific font families from the main theme.json to the variation json file. #233

Closed
matiasbenedetto opened this issue Sep 5, 2024 · 4 comments · Fixed by #237
Labels
[Component] Style Variations [Component] theme.json Gutenberg A bug or enhancement that needs to be solved in the Gutenberg repository [Status] Blocked Used to indicate that a current effort isn't able to move forward [Type] Enhancement A suggestion for improvement.

Comments

@matiasbenedetto
Copy link
Contributor

matiasbenedetto commented Sep 5, 2024

What?

Move the style variation specific font families from the main theme.json to the variation JSON file.

Why?

Currently, the font families must be defined in the main theme.json file to load as expected in the editor when the style variation is switched. If this issue WordPress/gutenberg#59965 is fixed (in progress WordPress/gutenberg#65019), we could avoid this 'hack' that's producing the printing of not needed CSS in the frontend. So, this change would be a tiny performance improvement, and it could lead to simpler-to-define typography variations.

@matiasbenedetto matiasbenedetto added [Type] Enhancement A suggestion for improvement. [Component] theme.json [Component] Style Variations Gutenberg A bug or enhancement that needs to be solved in the Gutenberg repository labels Sep 5, 2024
@carolinan carolinan added the [Status] Blocked Used to indicate that a current effort isn't able to move forward label Sep 5, 2024
@jasmussen
Copy link
Contributor

@jffng is #237 related to this? Just doing some dusting off of issues given the beta is nearing.

@jffng
Copy link
Contributor

jffng commented Sep 24, 2024

@jasmussen yes that's right — #237 depends on the above Gutenberg issue + PR being resolved.

@carolinan
Copy link
Contributor

@matiasbenedetto @jffng Are there any updates to this?

@matiasbenedetto
Copy link
Contributor Author

matiasbenedetto commented Oct 9, 2024

@matiasbenedetto @jffng Are there any updates to this?

👋 Yes, I updated both WordPress/gutenberg#65019 and #237

They are ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Style Variations [Component] theme.json Gutenberg A bug or enhancement that needs to be solved in the Gutenberg repository [Status] Blocked Used to indicate that a current effort isn't able to move forward [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants