-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Term Description: Handle default margin styles #51137
Conversation
Size Change: +34 B (0%) Total Size: 1.39 MB
ℹ️ View Unchanged
|
Flaky tests detected in 11c9b25. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5133608248
|
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.
Thanks @mikachan !
It's a bit unfortunate that this wrapper for the term description is necessary, because I think without it, we wouldn't need to add this CSS. But it looks like the wrapper is necessary to support text alignment.
Since it addresses the issue I'm giving the ✅ , also there is precedence for fixes like this.
This is great to see, given I had to do this just yesterday: wpengine/frost@48a6c0d |
Thank you, @mikachan ! |
What?
Fixes #50515.
This PR attempts to zero out the paragraph margins on the Term Description block and apply the current block gap size as margins on the block wrapper. Currently, the block is using the default browser-inherited styles.
Why?
At the moment, the Term Description block is unstyled. By inheriting the user agent styles, there's no connection to the rest of the site.
How?
Added a stylesheet for the Term Description block that: zeros the default margins for the paragraph element, and applies the block gap size (
--wp--style--block-gap
) to the Term Description wrapper.I added the block gap to the wrapper as otherwise there is no spacing around the Term Description block by default. By using the block gap variable, the size of this spacing is at least in line with the current theme.
Testing Instructions
Screenshots or screencast