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

FSE Plugin: Block Patterns with custom font size are broken #43478

Closed
iamtakashi opened this issue Jun 19, 2020 · 2 comments · Fixed by #43546
Closed

FSE Plugin: Block Patterns with custom font size are broken #43478

iamtakashi opened this issue Jun 19, 2020 · 2 comments · Fixed by #43546
Assignees
Labels
[Feature] Block Patterns Pattern content itself, and the functionality that lets you create patterns. [Pri] Normal [Type] Bug

Comments

@iamtakashi
Copy link
Contributor

iamtakashi commented Jun 19, 2020

I've noticed the block patterns with a custom font size don't seem working as expected in Atomic and my local install (Gutenberg 8.3.0 & FSE 1.10).

For example:

This is how the pattern looks in Simple site.
Screenshot 2020-06-19 at 13 06 14

However, this is how it looks in Atomic and local install. Notice the font size in the numbers.
Screenshot 2020-06-19 at 13 08 56

A brief look in the markup suggested to me that the "customFontSize":XX no longer works, and a new instance that I made with a custom font size has {"style":{"typography":{"fontSize":XX}}} instead.

@ianstewart @alaczek

@iamtakashi iamtakashi added [Type] Bug [Feature] Block Patterns Pattern content itself, and the functionality that lets you create patterns. labels Jun 19, 2020
@razvanpapadopol
Copy link

razvanpapadopol commented Jun 19, 2020

The font-size issue can be reproduced only within the editor. So there are probably some overwrites happening. If I preview the post with the block pattern outside the editor it looks fine.

@Addison-Stavlo
Copy link
Contributor

A brief look in the markup suggested to me that the "customFontSize":XX no longer works, and a new instance that I made with a custom font size has {"style":{"typography":{"fontSize":XX}}} instead.

This makes some sense. Some blocks in core have transitioned to the __experimentalFontSize hook. I think mainly paragraph and heading have this so far, but a handful of FSE blocks (site-title, post-author, etc.) will have these in the near future as well.

Where these blocks may have had a customFontSize attribute, the custom sizes are now saved under what you noted: {"style":{"typography":{"fontSize":XX}}}. Named font sizes such as "large" etc. are still saved under the attribute fontSize as a string.

Blocks that have this behavior have the __experimentalFontSize flag enabled in the supports object of their block.json file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block Patterns Pattern content itself, and the functionality that lets you create patterns. [Pri] Normal [Type] Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants