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

Fix for images being misaligned in paragraphs #1747

Merged
merged 3 commits into from
Jul 16, 2019

Conversation

joshdarby
Copy link
Collaborator

@joshdarby joshdarby commented Jul 15, 2019

Changes

This pull request makes the following changes:

Before:
Screen Shot 2019-07-15 at 12 07 14 PM

After:
Screen Shot 2019-07-15 at 12 07 28 PM

Why

For #1731.

Testing/Questions

Features that this PR affects:

  • Image blocks

Questions that need to be answered before merging:

  • Does it still look ok left aligned, right aligned, center aligned, and normal, wide, and full widths?

Steps to test this PR:

  1. Detailed in Patch Largo to fix Gutenberg stylesheet misaligning paragraphs and left/right images #1731, but basically add an image as the top block in a post and left/right align it with a paragraph below it.

@joshdarby joshdarby added type: bug priority: low Nice-to-have in a release. type: feature request category: styles affects lots of styles, requiring visual testing category: gutenberg Relating to general Gutenberg compatibility Estimate: < 2 Hours labels Jul 15, 2019
@joshdarby joshdarby added this to the 0.6.4 milestone Jul 15, 2019
@joshdarby joshdarby requested a review from benlk July 15, 2019 16:11
@joshdarby joshdarby self-assigned this Jul 15, 2019
@benlk benlk modified the milestone: 0.6.4 Jul 15, 2019
@benlk
Copy link
Collaborator

benlk commented Jul 16, 2019

Passes for:

  • left
  • center
  • right
  • none
  • wide
  • full

For wide and full, there's no space between the image and its following paragraph, which I think is because the markup changes for alignleft/alignright/aligncenter compared to alignwide/alignfull.

One is <figure class="wp-block-image alignwide"> and the other is <div class="wp-block-image"><figure class="alignleft is-resized">.

We only need to remove the margin-bottom on the aligned-left and aligned-right div.wp-block-image, so we can remove the lines for figure.wp-block-image.

@joshdarby
Copy link
Collaborator Author

joshdarby commented Jul 16, 2019

@benlk The figure.wp-block-image portion has been removed in 1198216.

@benlk
Copy link
Collaborator

benlk commented Jul 16, 2019

Passes for:

  • left
  • center
  • right
  • none
  • wide
  • full

👍

@joshdarby joshdarby merged commit 8bfd6e0 into 0.5-dev Jul 16, 2019
@benlk benlk deleted the 1731-fix-misaligning-paragraph-left-right-images branch July 19, 2019 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: gutenberg Relating to general Gutenberg compatibility category: styles affects lots of styles, requiring visual testing Estimate: < 2 Hours priority: low Nice-to-have in a release. type: bug type: feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants