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 (Issue 13784) #13819

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@
border-bottom: $border-width solid $light-gray-500;
bottom: auto;
}

}

// Unlike most explicit left/right alignments, this one should be flipped by the auto-RTL system.
Expand Down Expand Up @@ -368,6 +369,11 @@
}
}

// Center
&[data-align="center"] {
Copy link
Member

Choose a reason for hiding this comment

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

Have you considered doing &[data-align] [data-align="center"] to be a bit more specific to situations in where it's following another floated item?

Copy link
Contributor

@draganescu draganescu Apr 22, 2019

Choose a reason for hiding this comment

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

This is a good idea, however I would expect my block to not float no matter what it follows. @obenland do you have a specific example where this would be bad?

Copy link
Member

Choose a reason for hiding this comment

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

yeah, I have no idea what I meant there. I tested it locally and I think this is good to go.

clear: both;
}

// Wide and full-wide
&[data-align="full"],
&[data-align="wide"] {
Expand Down