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 style variations to handle different font options. #356

Merged
merged 3 commits into from
Aug 9, 2024

Conversation

matiasbenedetto
Copy link
Contributor

@matiasbenedetto matiasbenedetto commented Aug 7, 2024

Ref: #355, #336

What?

Add style variations to handle the different selection of fonts.
Each style variation includes 2 fonts to replace the primary and secondary fonts used across the site.
These style variations are just an example create based on some of the prod sites. They could require extra tweaks if the fonts picked are different from the ones desired.

Why?

  • This method can replace the current custom font plugins and reduce maintenance burden.
  • It works with WordPress 6.4.
  • It requires just a few clicks to activate.
  • No need to change the current theme SCSS files referencing the font vars (--wp--preset--font-family--primary, --wp--preset--font-family--secondary) because those are not changed.

Downsides

Screencast

2024-08-07.17-57-14.mp4

@jaymcp
Copy link
Contributor

jaymcp commented Aug 8, 2024

This looks really good, thanks so much for this PR! This is a much more streamlined user experience than our current crowbar. I can't quite replicate the nice user interface that I can see in your video, but I presume that that's a WP core version mismatch between our environments.

@matiasbenedetto
Copy link
Contributor Author

I can't quite replicate the nice user interface that I can see in your video, but I presume that that's a WP core version mismatch between our environments.

The interface featured in the PR description video was added in WordPress 6.6. In WordPress 6.4 the style variations are already available and can be selected like this:

2024-08-08.11-00-00.mp4

Copy link
Contributor

@jaymcp jaymcp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fantastic! Thanks so much, @matiasbenedetto 🙂

@jaymcp jaymcp merged commit 1e13a11 into amnestywebsite:develop Aug 9, 2024
1 check passed
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.

2 participants