Hello, first great job for this theme.
I have only one big issue with font weight in chrome browser.
With the theme.json conf below, font-weight 700 or 300 works on Firefox but not on Chrome.
To make it work on chrome i add a duplicate load of font file in my css (see fonts.css)
It's ok like that on front with chrome, but still not work in the admin gutemberg...
Have you got an idea ? i search and test for so long :)
The WP is in multisite mode.
{
"$schema": "https://schemas.wp.org/wp/6.0/theme.json",
"version": 2,
"customTemplates": [],
"settings": {
"appearanceTools": true,
"color": {
"duotone": [
{
"colors": [
"#000000",
"#ffffff"
],
"slug": "foreground-and-background",
"name": "Foreground and background"
},
{
"colors": [
"#000000",
"#fbb911"
],
"slug": "foreground-and-secondary",
"name": "Foreground and secondary"
},
{
"colors": [
"#5ec1cb",
"#ffffff"
],
"slug": "primary-and-background",
"name": "Primary and background"
},
{
"colors": [
"#5ec1cb",
"#fbb911"
],
"slug": "primary-and-secondary",
"name": "Primary and secondary"
}
],
"gradients": [
{
"slug": "vertical-secondary-to-background",
"gradient": "linear-gradient(to bottom,var(--wp--preset--color--secondary) 0%,var(--wp--preset--color--background) 100%)",
"name": "Vertical secondary to background"
},
{
"slug": "diagonal-primary-to-foreground",
"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--primary) 0%,var(--wp--preset--color--foreground) 100%)",
"name": "Diagonal primary to foreground"
},
{
"slug": "diagonal-secondary-to-background",
"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--secondary) 50%,var(--wp--preset--color--background) 50%)",
"name": "Diagonal secondary to background"
},
{
"slug": "diagonal-background-to-secondary",
"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--background) 50%,var(--wp--preset--color--secondary) 50%)",
"name": "Diagonal background to secondary"
}
],
"palette": [
{
"slug": "foreground",
"color": "#000000",
"name": "Foreground"
},
{
"slug": "background",
"color": "#ffffff",
"name": "Background"
},
{
"slug": "gray-text",
"color": "#717070",
"name": "Gray Text"
},
{
"slug": "gray-light",
"color": "#ededed",
"name": "Gray Light"
},
{
"slug": "primary",
"color": "#5ec1cb",
"name": "Primary"
},
{
"slug": "secondary",
"color": "#fbb911",
"name": "Secondary"
}
]
},
"custom": {
"spacing": {
"small": {
"top": "6px",
"right": "20px",
"bottom": "6px",
"left": "20px"
},
"medium": "clamp(1.50rem, 1.56vw, 1.875rem)",
"large": "clamp(3.25rem, 4.375vw, 5.25rem)",
"outer": "var(--wp--custom--spacing--small, 1.25rem)"
},
"typography": {
"font-size": {
"title": "clamp(2.75rem, 7.6vw, 4.375rem)",
"subtitle": "clamp(2.25rem, 5.4vw, 3.125rem)",
"thirdtitle": "clamp(1.2rem, 3.2vw, 1.875rem)",
"fourtitle": "clamp(0.8rem, 2.6vw, 1.5rem)"
},
"line-height": {
"tiny": 1.15,
"small": 1.2,
"medium": 1.4,
"normal": 1.6
}
}
},
"spacing": {
"units": [
"%",
"px",
"em",
"rem",
"vh",
"vw"
]
},
"typography": {
"dropCap": false,
"fontFamilies": [
{
"fontFamily": "\"PlayfairDisplay\", serif",
"name": "PlayfairDisplay",
"slug": "PlayfairDisplay",
"fontFace": [
{
"fontFamily": "PlayfairDisplay",
"fontWeight": "400",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/playfair-display-v30-latin-regular.woff",
"file:./assets/fonts/playfair-display-v30-latin-regular.woff2"
]
},
{
"fontFamily": "PlayfairDisplay",
"fontWeight": "700",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/playfair-display-v30-latin-700.woff",
"file:./assets/fonts/playfair-display-v30-latin-700.woff2"
]
},
{
"fontFamily": "PlayfairDisplay",
"fontWeight": "900",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/playfair-display-v30-latin-900.woff",
"file:./assets/fonts/playfair-display-v30-latin-900.woff2"
]
}
]
},
{
"fontFamily": "\"Montserrat\", sans-serif",
"name": "Montserrat",
"slug": "Montserrat",
"fontFace": [
{
"fontFamily": "Montserrat",
"fontWeight": "300",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/montserrat-v25-latin-300.woff2",
"file:./assets/fonts/montserrat-v25-latin-300.woff"
]
},
{
"fontFamily": "Montserrat",
"fontWeight": "400",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/montserrat-v25-latin-regular.woff2",
"file:./assets/fonts/montserrat-v25-latin-regular.woff"
]
},
{
"fontFamily": "Montserrat",
"fontWeight": "700",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/montserrat-v25-latin-700.woff2",
"file:./assets/fonts/montserrat-v25-latin-700.woff"
]
}
]
},
{
"fontFamily": "\"MontserratAlternates\", sans-serif",
"name": "MontserratAlternates",
"slug": "MontserratAlternates",
"fontFace": [
{
"fontFamily": "MontserratAlternates",
"fontWeight": "400",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/montserrat-alternates-v17-latin-regular.woff",
"file:./assets/fonts/montserrat-alternates-v17-latin-regular.woff2"
]
},
{
"fontFamily": "MontserratAlternates",
"fontWeight": "600",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/montserrat-alternates-v17-latin-600.woff",
"file:./assets/fonts/montserrat-alternates-v17-latin-600.woff2"
]
},
{
"fontFamily": "MontserratAlternates",
"fontWeight": "900",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/montserrat-alternates-v17-latin-900.woff",
"file:./assets/fonts/montserrat-alternates-v17-latin-900.woff2"
]
}
]
}
],
"fontSizes": [
{
"size": "0.94rem",
"slug": "small"
},
{
"size": "1rem",
"slug": "medium"
},
{
"size": "1.75rem",
"slug": "large"
},
{
"size": "clamp(1.75rem, 3vw, 2.25rem)",
"slug": "x-large"
}
]
},
"layout": {
"contentSize": "960px",
"wideSize": "1200px"
}
},
"styles": {
"blocks": {
"core/post-title": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"fontWeight": "900",
"lineHeight": "var(--wp--custom--typography--line-height--tiny)",
"fontSize": "var(--wp--custom--typography--font-size--title)"
}
},
"core/paragraph": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat)",
"fontWeight": "400"
},
"color": {
"text": "var(--wp--preset--color--gray-text)"
}
},
"core/columns": {
"spacing": {
"margin": {
"top": "var(--wp--custom--spacing--large)",
"bottom": "var(--wp--custom--spacing--large)"
}
}
},
"core/cover": {
"spacing": {
"margin": {
"top": "var(--wp--custom--spacing--large)",
"bottom": "var(--wp--custom--spacing--large)"
}
}
},
"core/media-text": {
"spacing": {
"margin": {
"top": "var(--wp--custom--spacing--large)",
"bottom": "var(--wp--custom--spacing--large)"
}
}
},
"core/post-comments": {
"spacing": {
"padding": {
"top": "var(--wp--custom--spacing--small)"
}
}
},
"core/pullquote": {
"border": {
"width": "1px 0"
}
},
"core/query-title": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"fontWeight": "600",
"lineHeight": "var(--wp--custom--typography--line-height--small)",
"fontSize": "var(--wp--custom--typography--font-size--title)"
}
},
"core/quote": {
"border": {
"width": "1px"
}
},
"core/site-title": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"lineHeight": "var(--wp--custom--typography--line-height--normal)",
"fontSize": "var(--wp--preset--font-size--medium)",
"fontStyle": "normal",
"fontWeight": "normal"
}
}
},
"color": {
"background": "var(--wp--preset--color--background)",
"text": "var(--wp--preset--color--foreground)"
},
"elements": {
"h1": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"fontWeight": "900",
"lineHeight": "var(--wp--custom--typography--line-height--tiny)",
"fontSize": "var(--wp--custom--typography--font-size--title)"
}
},
"h2": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"fontWeight": "600",
"lineHeight": "var(--wp--custom--typography--line-height--small)",
"fontSize": "var(--wp--custom--typography--font-size--subtitle)"
},
"color": {
"text": "var(--wp--preset--color--primary)"
}
},
"h3": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"fontWeight": "600",
"lineHeight": "var(--wp--custom--typography--line-height--tiny)",
"fontSize": "var(--wp--custom--typography--font-size--thirdtitle)"
}
},
"h4": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"fontWeight": "600",
"lineHeight": "var(--wp--custom--typography--line-height--tiny)",
"fontSize": "var(--wp--preset--font-size--medium)"
}
},
"h5": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"fontWeight": "700",
"lineHeight": "var(--wp--custom--typography--line-height--normal)",
"fontSize": "var(--wp--preset--font-size--medium)"
}
},
"h6": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"fontWeight": "400",
"lineHeight": "var(--wp--custom--typography--line-height--normal)",
"fontSize": "var(--wp--preset--font-size--medium)"
}
},
"link": {
"color": {
"text": "var(--wp--preset--color--primary)"
}
},
"button": {
"border": {
"radius": "24px",
"color": "var(--wp--preset--color--primary)",
"width": "2px",
"style": "solid"
},
"color": {
"background": "var(--wp--preset--color--background)",
"text": "var(--wp--preset--color--foreground)"
},
"typography": {
"fontSize": "var(--wp--preset--font-size--small)",
"fontWeight": "700",
"textTransform": "uppercase"
},
"spacing": {
"padding": {
"top": "var(--wp--custom--spacing--small--top)",
"bottom": "var(--wp--custom--spacing--small--bottom)",
"left": "var(--wp--custom--spacing--small--left)",
"right": "var(--wp--custom--spacing--small--right)"
}
},
":hover": {
"color": {
"background": "var(--wp--preset--color--primary)",
"text": "var(--wp--preset--color--foreground)"
}
}
}
},
"spacing": {
"blockGap": "1.5rem"
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat)",
"lineHeight": "var(--wp--custom--typography--line-height--normal)",
"fontSize": "var(--wp--preset--font-size--medium)",
"fontStyle": "normal",
"fontWeight": "400"
}
},
"templateParts": []
}
/* montserrat-300 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: "Montserrat";
font-style: normal;
font-weight: 300;
src: url("../fonts/montserrat-v25-latin-300.woff2") format("woff2"),
/* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/montserrat-v25-latin-300.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* montserrat-regular - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: "Montserrat";
font-style: normal;
font-weight: 400;
src: url("../fonts/montserrat-v25-latin-regular.woff2") format("woff2"),
/* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/montserrat-v25-latin-regular.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* montserrat-700 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: "Montserrat";
font-style: normal;
font-weight: 700;
src: url("../fonts/montserrat-v25-latin-700.woff2") format("woff2"),
/* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/montserrat-v25-latin-700.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* playfair-display-regular - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: "Playfair Display";
font-style: normal;
font-weight: 400;
src: url("../fonts/playfair-display-v30-latin-regular.woff2") format("woff2"),
/* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/playfair-display-v30-latin-regular.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* playfair-display-700 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: "Playfair Display";
font-style: normal;
font-weight: 700;
src: url("../fonts/playfair-display-v30-latin-700.woff2") format("woff2"),
/* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/playfair-display-v30-latin-700.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* playfair-display-900 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: "Playfair Display";
font-style: normal;
font-weight: 900;
src: url("../fonts/playfair-display-v30-latin-900.woff2") format("woff2"),
/* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/playfair-display-v30-latin-900.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* montserrat-alternates-regular - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: "Montserrat Alternates";
font-style: normal;
font-weight: 400;
src: url("../fonts/montserrat-alternates-v17-latin-regular.woff2") format("woff2"),
/* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/montserrat-alternates-v17-latin-regular.woff")
format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* montserrat-alternates-600 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: "Montserrat Alternates";
font-style: normal;
font-weight: 600;
src: url("../fonts/montserrat-alternates-v17-latin-600.woff2") format("woff2"),
/* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/montserrat-alternates-v17-latin-600.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}