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

Post Terms: Add spacing support #43646

Merged
merged 2 commits into from
Sep 28, 2022

Conversation

ndiego
Copy link
Member

@ndiego ndiego commented Aug 26, 2022

Related:

What?

Add padding and margin support to the Post Terms block.

Why?

To create consistency across blocks.

How?

Added the relevant block supports in block.json

Testing Instructions

  1. Insert a new Post Terms block.
  2. Confirm the Dimension control panel allows you to add both padding and margin.
  3. Adding padding and margin.

Screenshots or screencast

post-term-spacing

@ndiego ndiego added [Type] Enhancement A suggestion for improvement. [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Block] Post Terms Affects the Post Terms Block labels Aug 26, 2022
@ndiego ndiego self-assigned this Aug 26, 2022
@ndiego ndiego changed the title Post Terms: Add padding support Aug 26, 2022
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule is currently only targeting the separator, so it looks like we need to add a separate rule to target the wrapper classname 🙂

image

E.g.

.wp-block-post-terms {
	// This block has customizable padding, border-box makes that more predictable.
	box-sizing: border-box;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, my sloppy mistake. I will correct that.

Copy link
Contributor

@carolinan carolinan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theme.json, global styles and editing individual blocks work.

When nested, the margins are overriden by the is-layout-constrained styles.
Meaning that it will not always work, for example in its default position in Twenty Twenty-Two and Twenty Twenty-Three.

Copy link
Contributor

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ndiego, this is testing nicely now!

image

Looks like it'll just need a rebase to get the tests passing before it can be merged.

LGTM! ✨

@ndiego ndiego force-pushed the add/post-terms-add-spacing-support branch from 5cbf629 to 484a0bf Compare September 28, 2022 15:03
@ndiego
Copy link
Member Author

ndiego commented Sep 28, 2022

Sorry for the delay on this. Just rebased and now all checks have passed. 🚢ing

@ndiego ndiego merged commit 94565f6 into WordPress:trunk Sep 28, 2022
@ndiego ndiego deleted the add/post-terms-add-spacing-support branch September 28, 2022 17:10
@github-actions github-actions bot added this to the Gutenberg 14.3 milestone Sep 28, 2022
@femkreations femkreations added the Needs User Documentation Needs new user documentation label Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Terms Affects the Post Terms Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Needs User Documentation Needs new user documentation [Type] Enhancement A suggestion for improvement.
4 participants