Gutenberg: Media/Text Block: RTL styles for media alignment not working

Created on 13 Oct 2019  路  7Comments  路  Source: WordPress/gutenberg

Describe the bug

The media/image block does not respect media alignments.

To reproduce

Steps to reproduce the behavior:

  1. Go to /wp-admin/options-general.php and change the site language to an RTL language, e.g. Hebrew
  2. Go to /wp-admin/post-new.php
  3. Add the following two media/image blocks:
    3.1 Media: left / Text: right
    3.2 Media: right / Text: left

Expected behavior

  • Left-aligned images appear on the left and right-aligned images appear on the right.

Screenshots

  • Left-aligned images appear on the right and right-aligned images appear on the left.

Desktop (please complete the following information):

  • OS: iOS 10.14.6 (18G103)
  • Browser Chrome Version 77.0.3865.90 (Official Build) (64-bit)

Additional context

Internationalization (i18n) Needs Dev [Block] Media & Text [Status] In Progress [Type] Bug

All 7 comments

Here's what's going on from a visual standpoint.

Screen Shot 2019-11-06 at 10 39 27 AM

Good catch @nielslange. So is the solution we're looking for to have the block not swap left and right? Or to adjust the labels/icons to support the RTL result?

Good catch @nielslange. So is the solution we're looking for to have the block not swap left and right? Or to adjust the labels/icons to support the RTL result?

@richtabor Either way works, as long as the image is aligned in accordance to users selection. Thus, if a user clicks on Show media on left, as seen in @mapk's screenshot in https://github.com/WordPress/gutenberg/issues/17922#issuecomment-550444839, the image needs to be shown on the left.

In the case of RTL languages, the solution is to NOT swap the image position, only the text alignment. The image position is easily fixed by just clicking the positioning icons for the block.

This way the buttons represent the layout, not the language. "Media on left" is always media on left. Regardless of language, left is still left.

@mapk Isn't that what I mentioned in https://github.com/WordPress/gutenberg/issues/17922#issuecomment-559008781? 馃榾

@nielslange definitely as you mentioned. 馃憤 The comments lead to two different solutions, so I just wanted to clarify what the path forward for this should be.

I see. Thanks for clarifying this, @mapk! 馃檶

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ellatrix picture ellatrix  路  3Comments

cr101 picture cr101  路  3Comments

jasmussen picture jasmussen  路  3Comments

spocke picture spocke  路  3Comments

youknowriad picture youknowriad  路  3Comments