- Issue created by @rpayanm
- πΊπΈUnited States j_s
I'm also unable to get font sizes to work with the provided instructions. It just shows the default set of font size options.
- π΅πΉPortugal marcofernandes
It should work. But for versions >= 2.6, these settings were deprecated and font sizes should be set at the following section:
- theme-support - __experimentalFeatures - typography - fontSizes - theme - name: ...
We need to update the documentation.
Anyway, make sure the configuration is at the theme folder and it's called[theme-name].gutenberg.yml
. The theme must be active. - Merge request !128Issue #3348015: Fix indention and move font sizes section. β (Merged) created by marcofernandes
-
marcofernandes β
committed 0d1b2cc1 on 8.x-2.x
Issue #3348015: Fix indention and move font sizes section.
-
marcofernandes β
committed 0d1b2cc1 on 8.x-2.x
- πΊπΈUnited States j_s
I have a custom theme for the front-end but use Claro for admin theme.
In mytheme.gutenberg.yml I tried using your syntax:
- theme-support: - __experimentalFeatures: - typography: - fontSizes: - theme: - name: "Small" slug: "small" size: 14 - name: "Lead" slug: "lead" size: 20 - name: "Display 1" slug: "display-1" size: 96 - name: "Display 2" slug: "display-2" size: 88 - name: "Display 3" slug: "display-3" size: 72 - name: "Display 4" slug: "display-4" size: 56
That didn't seem to work, so I tried without the hyphens:
theme-support: __experimentalFeatures: typography: fontSizes: theme: - name: "Small" slug: "small" size: 14 - name: "Lead" slug: "lead" size: 20 - name: "Display 1" slug: "display-1" size: 96 - name: "Display 2" slug: "display-2" size: 88 - name: "Display 3" slug: "display-3" size: 72 - name: "Display 4" slug: "display-4" size: 56
That worked and I can see a dropdown of my specified font sizes.
I was also able to get custom colors in like this:
theme-support: __experimentalFeatures: color: background: true button: true caption: true defaultDuotone: false defaultGradients: false text: true defaultPalette: false heading: true link: true palette: theme: - slug: "blue" name: "Blue" color: "#0000FF" - slug: "red" name: "Red" color: "#CC0000"
Thanks!
- Status changed to Closed: works as designed
11 months ago 7:54am 21 May 2024 - π΅πΉPortugal marcofernandes
Oh.. I put the hyphens for better readability but now I see it just added confusion. Sorry about that. Anyway, I'm glad it work.