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

RTL: Fix left/right alignments of blocks #3911

Merged
merged 3 commits into from Jul 3, 2018

Conversation

Projects
None yet
6 participants
@yoavf
Contributor

yoavf commented Dec 11, 2017

Description

Prevent RTLCSS from reversing specific CSS rules related to left/right alignment of blocks
Similar to #3909, necessry after #3844

Without this change, left aligning a block puts on the right and vice versa.

Types of changes

CSS comments to prevent automatic flipping of CSS properties.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows has proper inline documentation.

@yoavf yoavf changed the title from Fix left/right alignments of blocks in RTL mode to RTL: Fix left/right alignments of blocks Dec 11, 2017

@youknowriad

Thanks for working on this. While in master the block alignments are reverted, they work correctly. In this PR the block alignment is broken (they show up out of the "centered" area)

@gziolo

This comment has been minimized.

Member

gziolo commented Jan 27, 2018

@yoavf do you plan to finish this PR or should someone else take it over?

@yoavf

This comment has been minimized.

Contributor

yoavf commented Jan 30, 2018

@gziolo on it - updated the pr

@gziolo gziolo requested a review from WordPress/gutenberg-core Feb 2, 2018

@gziolo gziolo removed the [Status] Stale label Feb 2, 2018

@tofumatt

This comment has been minimized.

Member

tofumatt commented Jun 17, 2018

Hey @yoavf, looks like there are a few conflicts here now but if you can update the branch and fix the conflicts I promise to review this ASAP (feel free to assign/ping me for review once it's updated) 😄

Sorry about not getting to this one 😞

yoavf added some commits Jun 21, 2018

fix toolbar rtl: default position shouldn't be ignored, and we should…
… add positioning for [data-align='left'] as well so that it's mirrored correctly
@azaozz

This comment has been minimized.

Contributor

azaozz commented Jun 21, 2018

Tested in few blocks (image, gallery, paragraph, list, table) and all works well.

@azaozz

This comment has been minimized.

Contributor

azaozz commented Jun 25, 2018

In this PR the block alignment is broken (they show up out of the "centered" area)

This seems fixed with the latest changes here. Anything else blocking this?

@tofumatt

All looks good and works for me.

A few minor nitpicks with the comments, but feel free to address them as you feel appropriate and then get this merged 😄 👍

@@ -366,7 +366,7 @@
}
}
// The padding collapses, but the outline is still 1px to compensate for.
// The padding collapses, but the outline is still 1px to compensate for.

This comment has been minimized.

@tofumatt

tofumatt Jun 26, 2018

Member

To compensate for what? I think this comment is incomplete.

This comment has been minimized.

@gziolo

gziolo Jul 3, 2018

Member

@tofumatt - can you update this comment yourself and merge this PR?

This comment has been minimized.

@tofumatt

tofumatt Jul 3, 2018

Member

Totally, will do!

EDIT: I forgot about this PR and realised my issue is I have no idea what this means, but I'll figure it out and address...

@@ -375,19 +375,24 @@
// Left
&[data-align="left"] {
.editor-block-list__block-edit { // This is in the editor only, on the frontend, the img should be floated

This comment has been minimized.

@tofumatt

tofumatt Jun 26, 2018

Member

I know it's not part of this PR but that's a weird indentation/comment placement, if anymore edits are made it'd be nice to tidy it up 😉

Issues reported were fixed with a later commit.

@jasmussen jasmussen added this to the 3.2 milestone Jun 29, 2018

@tofumatt tofumatt removed this from the 3.2 milestone Jul 3, 2018

@tofumatt tofumatt merged commit b332ebd into WordPress:master Jul 3, 2018

2 checks passed

codecov/project 46.81% (-0.09%) compared to 859f016
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

tofumatt added a commit that referenced this pull request Jul 3, 2018

@tofumatt tofumatt added this to the 3.2 milestone Jul 3, 2018

tofumatt added a commit that referenced this pull request Jul 3, 2018

chore: Address comments in #3911 (#7690)
* chore: Fix unclear comments
* chore: Tidy up inline comments

@yoavf yoavf deleted the yoavf:update/blocks-alignment-rtl branch Jul 4, 2018

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