Opened 2 weeks ago
Closed 2 weeks ago
#66382 closed defect (bug) (fixed)
Left/right aligned blocks have the wrong margin side in RTL
| Reported by: | im3dabasia1 | Owned by: | peterwilsoncc |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.2 |
| Component: | Editor | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
Description (last modified by )
The .alignleft / .alignright layout rules combine a physical float with logical margin-inline-* margins. In RTL the 2em gap lands against the container edge instead of between the block and the wrapping text.
Switching to margin-left / margin-right fixes this. LTR output is unchanged.
Steps to reproduce:
- Set the site language to Arabic or Hebrew.
- Add an Image block, align it Left, and set its width to around 400px.
- Add a long Paragraph after it.
- On the front end, the gap is at the container edge instead of between the image and the text.
Gutenberg issue: https://github.com/WordPress/gutenberg/issues/40501
Gutenberg PR: https://github.com/WordPress/gutenberg/pull/83520
Change History (5)
This ticket was mentioned in PR #14878 on WordPress/wordpress-develop by @im3dabasia1.
2 weeks ago
#1
- Keywords has-unit-tests added
@peterwilsoncc commented on PR #14878:
2 weeks ago
#4
The E2E SCRIPT_+DEBUG enabled test has failed a couple of times, reviewing the errors each time it is due to problems connecting with the WP.org API so I will ignore those and external/networking errors.
Trac ticket: https://core.trac.wordpress.org/ticket/66382
Backport of WordPress/gutenberg#83520.
.alignleftand.alignrightlayout rules used logicalmargin-inline-*alongside a physicalfloat.margin-left/margin-right.Only the PHP is ported here. The JS and SCSS changes come through the package sync.