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

Refactor Paragraph margin rules for consistent, non block-gap values #4908

Merged
merged 1 commit into from
Oct 27, 2021

Conversation

pbking
Copy link
Contributor

@pbking pbking commented Oct 26, 2021

Changes proposed in this Pull Request:

This change:

  • Removes the bottom margin from paragraphs
  • Adjusts the top-margin of any element that FOLLOWS a paragraph to be the "paragraph gap" size.

Thus the "paragraph gap" rules are as such:

Inside any wp-container,
Any paragraph element that IS NOT THE FIRST thing and
Any element immediately after a paragraph element
use paragraph gap rules

This allows us to define the paragraph gap rules differently than the general block-gap rules and those rules will be followed on both sides of the paragraph.

Before:
image

(note that: the gap above the top of the group is 30px while the gap below is 1em)
After:

image
(note that: the gap above and below the group is 1em)

The gap between the bottom button and image remains 30px.

Related issue(s):

Closes: #4851

Copy link
Contributor

@MaggieCabrera MaggieCabrera left a comment

Choose a reason for hiding this comment

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

this looks great to me, thank you!

@scruffian scruffian merged commit 8c91028 into trunk Oct 27, 2021
@pbking pbking deleted the fix/paragraph-bottom-padding branch April 12, 2022 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blockbase: ponyfill p margins rules create unexpected behavior
3 participants