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: Block alignment css rules affecting nested blocks #10142

Merged
merged 1 commit into from Sep 25, 2018

Conversation

Projects
None yet
2 participants
@jorgefilipecosta
Member

jorgefilipecosta commented Sep 24, 2018

Description

Some CSS rules to apply left and right alignment used the CSS children selector instead of direct children selector. This caused some bugs on nested blocks.
It was discovered during the PR #10141 where the bug caused some troubles.
Note that for wide alignment direct children selector was being correctly used.

How has this been tested?

I added the test block available in https://gist.github.com/jorgefilipecosta/78f206b7c5a28458b54b2abce04787e8 ( pasted it in the console).
I made the block right aligned and verified the block kept its shape.

Screenshots

Before:
screen shot 2018-09-24 at 19 49 20

After:
screen shot 2018-09-24 at 19 52 26

&[data-align="right"] > .editor-block-contextual-toolbar > .editor-block-toolbar {
/*!rtl:begin:ignore*/
float: right;
/*!rtl:end:ignore*/

This comment has been minimized.

@jorgefilipecosta

jorgefilipecosta Sep 24, 2018

Member

Previous we did not have rtl end for this rule. I'm almost certain that it was a bug and "end" should have been present but It would be perfect if someone could double check.

@jorgefilipecosta

jorgefilipecosta Sep 24, 2018

Member

Previous we did not have rtl end for this rule. I'm almost certain that it was a bug and "end" should have been present but It would be perfect if someone could double check.

This comment has been minimized.

@jasmussen

jasmussen Sep 25, 2018

Contributor

Good catch, thank you.

@jasmussen

jasmussen Sep 25, 2018

Contributor

Good catch, thank you.

@jasmussen

Thank you for fixing this. This is working well for me and doesn't appear to have any downsides.

@jorgefilipecosta jorgefilipecosta merged commit fdf5c39 into master Sep 25, 2018

2 checks passed

codecov/project 48.81% remains the same compared to 51f0174
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jorgefilipecosta jorgefilipecosta deleted the fix/block-alignment-css-rules-nested-blocks branch Sep 25, 2018

@jorgefilipecosta

This comment has been minimized.

Show comment
Hide comment
@jorgefilipecosta

jorgefilipecosta Sep 25, 2018

Member

Thank you for the review @jasmussen!

Member

jorgefilipecosta commented Sep 25, 2018

Thank you for the review @jasmussen!

@jorgefilipecosta jorgefilipecosta added this to the 4.0 milestone Sep 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment