Skip to content

Commit 9ba61f3

Browse files
authored
Merge pull request #665 from newfold-labs/fix/font-family-css-application
Fix Font Family Issues
2 parents 9511bda + 88a19d4 commit 9ba61f3

File tree

1 file changed

+4
-4
lines changed
  • src/OnboardingSPA/components/Sidebar/components/Customize/DesignFontsPanel

1 file changed

+4
-4
lines changed

src/OnboardingSPA/components/Sidebar/components/Customize/DesignFontsPanel/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,17 +307,17 @@ const DesignFontsPanel = forwardRef(
307307
let body;
308308
const slug = currentData.sitegen?.homepages?.active?.slug;
309309
if ( selectedGroup === 'custom' ) {
310-
headings = `var(--wp--preset--font-family--${ customFont.headings })`;
311-
body = `var(--wp--preset--font-family--${ customFont.body })`;
310+
headings = `var(--wp--preset--font-family--${ customFont.headings?.toLowerCase() })`;
311+
body = `var(--wp--preset--font-family--${ customFont.body?.toLowerCase() })`;
312312
if ( slug ) {
313313
currentData.sitegen.homepages.data[ slug ].customFont =
314314
customFont;
315315
currentData.sitegen.homepages.active.customFont =
316316
customFont;
317317
}
318318
} else {
319-
headings = `var(--wp--preset--font-family--${ fontGroups[ selectedGroup ].headingsSlug })`;
320-
body = `var(--wp--preset--font-family--${ fontGroups[ selectedGroup ].bodySlug })`;
319+
headings = `var(--wp--preset--font-family--${ fontGroups[ selectedGroup ].headingsSlug?.toLowerCase() })`;
320+
body = `var(--wp--preset--font-family--${ fontGroups[ selectedGroup ].bodySlug?.toLowerCase() })`;
321321
}
322322
currentData.sitegen.homepages.data[ slug ].selectedFontGroup =
323323
selectedGroup;

0 commit comments

Comments
 (0)