-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: remove font definition from the default block styles #43195
Conversation
… to make it customizable using theme.json
Size Change: -328 B (0%) Total Size: 1.27 MB
ℹ️ View Unchanged
|
…e.json definitions
}, | ||
"__experimentalStyle": { | ||
"typography": { | ||
"fontSize": "1.5em", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify why this font size was chosen? Only because it is in between the two current values?
(I do not know why there were two font sizes in the first place)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I chose that font size because it is in the middle of the previous 2 sizes used here, with the intention of fixing the problem and causing fewer possible changes on sites using already using the block.
What?
Pullquote block: remove font definition from the default block styles to make it customizable using theme.json
Why?
Because currently 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.
Currently it doesn't work well because the theme.json targets .
wp-block-pullquote
and the built-in block css targets.wp-block-pullquote p
so the theme.json definition is overridden.So if we set this in theme.json
We get that size modified by the relative
em
unit specified by the block CSS with a more specific selector.How?
In this PR I'm removing the CSS definitions from the block CSS and adding it to block.json
.
Testing Instructions
theme.json
fileScreenshots or screencast
Before:
pullquote.font.size.before.mp4
After:
pullquote.font.size.mp4