Description
Adding a pseudo state + typography config to post content in theme.json breaks the block margin — this specifically happens when styles.blocks.core/post-content.elements.link.:hover.typography and any of the following properties are configured:
fontWeight, fontSize, fontStyle
I found that property is applied correctly, but the block margin breaks. There may be more combinations but that's what I discovered in my testing.
Step-by-step reproduction instructions
Add this CSS to your theme.json.
"styles": {
"blocks": {
"core/post-content": {
"elements": {
"link": {
":hover": {
"typography": {
"fontStyle": "italic"
}
}
}
}
}
}
}
Or checkout this PR for emptytheme: WordPress/theme-experiments#309
Verify the margin-block-start breaks (is not parsed correctly?).
Screenshots, screen recording, code snippet
| Before |
After |
 |
 |
Environment info
- Gutenberg
trunk
- MacOS 12.2
- Chrome, Safari
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
Description
Adding a pseudo state + typography config to post content in theme.json breaks the block margin — this specifically happens when
styles.blocks.core/post-content.elements.link.:hover.typographyand any of the following properties are configured:fontWeight,fontSize,fontStyleI found that property is applied correctly, but the block margin breaks. There may be more combinations but that's what I discovered in my testing.
Step-by-step reproduction instructions
Add this CSS to your theme.json.
Or checkout this PR for emptytheme: WordPress/theme-experiments#309
Verify the
margin-block-startbreaks (is not parsed correctly?).Screenshots, screen recording, code snippet
Environment info
trunkPlease confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes