Block theme incompatibility?
-
Hi, I’m working on a block theme that sets font sizes like this in theme.json:
"typography": { "dropCap": false, "fluid": true, "fontFamilies": [ ... ] "fontSizes": [ { "fluid": { "max": "1rem", "min": "0.875rem" }, "size": "1rem", "slug": "small" }, { "fluid": { "max": "1.125rem", "min": "1rem" }, "size": "1.125rem", "slug": "medium" }, { "fluid": { "max": "1.625rem", "min": "1.5rem" }, "size": "1.5rem", "slug": "large" }, { "fluid": { "max": "2rem", "min": "1.75rem" }, "size": "1.75rem", "slug": "x-large" }, { "fluid": { "max": "2.75rem", "min": "2rem" }, "size": "2rem", "slug": "xx-large" } ] },
On non-AMP pages, these are then translated into these global style variables as expected:
body { ... --wp--preset--font-size--small: clamp(.875rem,.875rem + ((1vw - .48rem)*0.24),1rem); --wp--preset--font-size--medium: clamp(1rem,1rem + ((1vw - .48rem)*0.24),1.125rem); --wp--preset--font-size--large: clamp(1.5rem,1.5rem + ((1vw - .48rem)*0.24),1.625rem); --wp--preset--font-size--x-large: clamp(1.75rem,1.75rem + ((1vw - .48rem)*0.481),2rem); --wp--preset--font-size--xx-large: clamp(2rem,2rem + ((1vw - .48rem)*1.442),2.75rem); ... }
But on AMP pages, these particular global variables are missing. All other
--wp--preset--
variables like colors, spacing and even font families are there, but not font sizes.Why is that?
You can see the result (small post title and content titles) on the shared URL.
I did notice these in amp-custom.css:
:root { --wp--preset--font-size--normal: 16px; --wp--preset--font-size--huge: 42px; }
But they are not used anywhere…
The page I need help with: [log in to see the link]
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Block theme incompatibility?’ is closed to new replies.