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

Pullquote block: font settings from theme.json are overriden by block styles #43194

Closed
matiasbenedetto opened this issue Aug 12, 2022 · 3 comments
Labels
[Block] Pullquote Affects the Pullquote Block [Type] Bug An existing feature does not function as intended

Comments

@matiasbenedetto
Copy link
Contributor

matiasbenedetto commented Aug 12, 2022

Description

The font settings from a theme's theme.json file such as font size and line height are being overridden by the default block styles.

Step-by-step reproduction instructions

  1. Set emptytheme to discard other styles problems.
  2. Add a pullquote block to a post
  3. Change the font settings for the pullquote block in your theme theme.json file
	"styles": {
		"blocks": {
			"core/pullquote": {
				"typography": {
					"fontSize": "3rem"
				}
			}
		}
	}
  1. Check that the font size is not applied because is overridden by the default CSS definition of the block.

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress 6.0.1
  • Gutenberg trunk

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@matiasbenedetto matiasbenedetto added [Block] Pullquote Affects the Pullquote Block [Type] Bug An existing feature does not function as intended labels Aug 12, 2022
@justintadlock
Copy link
Contributor

This also affects the line-height.

For more context, the font-size is used, but the inner <p> style uses a relative unit for it:

.wp-block-pullquote p {
	font-size: 1.75em;
	line-height: 1.6;
}

Right now, theme authors have to kind of "hack" this by calculating what 1.75em is relative to whatever size that they actually want and defining that in theme.json.

@matiasbenedetto
Copy link
Contributor Author

@justintadlock This recently merged PR (#4319) should fix this, so I'm closing this issue. Feel free to re-open it if this is still a problem using the latest Gutenberg trunk version.

@justintadlock
Copy link
Contributor

@matiasbenedetto Thanks for the update. I'm pretty sure you meant to reference #43195. It definitely seems to be working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Pullquote Affects the Pullquote Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants