Skip to content

Add style variations to handle different font options. - #356

Merged
jaymcp merged 3 commits into
amnestywebsite:developfrom
matiasbenedetto:add/style-variations
Aug 9, 2024
Merged

jaymcp merged 3 commits into
amnestywebsite:developfrom
matiasbenedetto:add/style-variations

Conversation

@matiasbenedetto

@matiasbenedetto matiasbenedetto commented Aug 7, 2024 •

Copy link
Copy Markdown
Contributor

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

jaymcp commented Aug 8, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

@jaymcp jaymcp left a comment

Copy link
Copy Markdown
Contributor

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 🙂

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