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

Fix list of base theme fonts when a theme variation is applied. #59959

Merged
merged 4 commits into from
Mar 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improve comment
  • Loading branch information
matiasbenedetto committed Mar 21, 2024
commit 12787e2e2465245e868c41d676cc9bededaf2658
Original file line number Diff line number Diff line change
@@ -117,9 +117,9 @@ function FontLibraryProvider( { children } ) {
/*
* Base Theme Fonts are the fonts defined in the theme.json *file*.
*
* Use the fonts from global styles + the ones from the theme.json file that hasn't repeated slugs.
* Uses the fonts from global styles + the ones from the theme.json file that hasn't repeated slugs.
* Avoids incosistencies with the fonts listed in the font library modal as base (unactivated).
* These inconsistencies can happen when the active theme fonts in global styles aren't defined in theme.json file as when a theme variant is applied.
* These inconsistencies can happen when the active theme fonts in global styles aren't defined in theme.json file as when a theme style variantion is applied.
*/
const baseThemeFonts = baseFontFamilies?.theme
Copy link
Contributor

Choose a reason for hiding this comment

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

@matiasbenedetto: Since the value is now a union with themeFonts, are these still baseThemeFonts — or does the name need changing?

? themeFonts.concat(