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: Clear floats on specific successive blocks that use alignment tool #16780

Closed
wants to merge 3 commits into from

Conversation

obenland
Copy link
Member

Description

Rebased PR #13819, fixing conflicts with master.
See #13819 (comment)

Fixes #13819.
Fixes #13784.

How has this been tested?

In local environment, adding images and floating them around.

Types of changes

Adds a CSS selector to clear center-aligned images.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

codetipi and others added 3 commits July 26, 2019 13:48
Improves frontend/backend consistency of floats. Themes (Including Twentynineteen) generally clear blocks with center alignment if they come straight after a block with left/right float.

To recreate:

1- Add two blocks with alignment options, such as the Image block.
2- Set first block to align to left/right and set second block to align to center.
3- Second block should be 100% the width and clear the float from the first block.
@obenland obenland added General Interface Parts of the UI which don't fall neatly under other labels. Good First Review A PR that's suitable for someone looking to contribute for the first time by reviewing code First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository labels Jul 26, 2019
@obenland obenland requested a review from gziolo July 26, 2019 20:54
@obenland obenland self-assigned this Jul 26, 2019
// Center
&[data-align="center"] {
clear: both;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I still have the same question, not sure if it was answered. This behavior only applies to the editor, do we want to apply the same behavior in the frontend too?

Copy link
Contributor

Choose a reason for hiding this comment

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

it makes sense to have the same behavior right?

Copy link
Contributor

Choose a reason for hiding this comment

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

It does for me 🤷‍♂ but maybe we're expecting the theme to define that?

@karmatosed karmatosed removed the Good First Review A PR that's suitable for someone looking to contribute for the first time by reviewing code label Aug 19, 2019
@talldan talldan added the [Status] Needs More Info Follow-up required in order to be actionable. label Aug 29, 2019
@paaljoachim
Copy link
Contributor

paaljoachim commented Sep 9, 2019

This would be a PR that would be great to get as soon as possible into Gutenberg and core, as floats and alignment issues still need fixing.

@obenland or others.
Can we get an update to where this PR is at at the moment? From the above it seems almost ready for the last code review and then merge.

EDIT: Obenland told me that he does not have the time to work on this PR.

@jasmussen
Copy link
Contributor

Closing this one in favor of #21608. Let me know if this was in error!

@jasmussen jasmussen closed this Apr 15, 2020
@aristath aristath deleted the fix/13784-image-floats branch November 10, 2020 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository General Interface Parts of the UI which don't fall neatly under other labels. [Status] Needs More Info Follow-up required in order to be actionable.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Two blocks with align attribute are not being cleared correctly.
8 participants