Make WordPress Core

Opened 7 years ago

Closed 4 years ago

#49447 closed defect (bug) (fixed)

Twenty Twenty: style of rtl paragraph

Reported by: amirkamizi Owned by: audrasjb
Priority: normal Milestone: 6.1
Component: Bundled Theme Version: 5.3
Severity: normal Keywords: has-patch commit
Cc: Focuses: css, rtl

Description (last modified by SergeyBiryukov)

when changing the language of the website with polylang plugin i noticed everything works perfectly except the alighnment of paragraphs which were still left to right although in the editor i set them to be right to left and it also got the class has-text-align-right

after checking many things I realzed in the style-rtl.css file the mentioned class (has-text-align-right) has text align as left and (has-text-align-left) had text alight to left as well.
so i changed the has-text-align-right to the following and now everything works great

.has-text-align-right {
	text-align: right;
}

Attachments (2)

49447.diff​ (303 bytes ) - added by mayankmajeji 7 years ago.
has-text-align-right class alignment corrected
49447-1.diff​ (774 bytes ) - added by hasanuzzamanshamim 4 years ago.
Patch created for rtl issue

Download all attachments as: .zip

Change History (13)

#1 @SergeyBiryukov
7 years ago

  • Component Formatting → Bundled Theme
  • Summary style of rtl paragraph for twenty twenty theme → Twenty Twenty: style of rtl paragraph

#2 @SergeyBiryukov
7 years ago

  • Description modified (diff)

#3 @ianbelanger
7 years ago

  • Keywords needs-patch added
  • Milestone Awaiting Review → 5.5
  • Severity major → normal
  • Version 5.3.2 → 5.3

@mayankmajeji
7 years ago

has-text-align-right class alignment corrected

#4 @mayankmajeji
7 years ago

  • Keywords has-patch added; needs-patch removed

#5 @ianbelanger
7 years ago

  • Keywords 2nd-opinion added
  • Milestone 5.5 → Future Release

Looking for a second opinion on this one. It seems like if a paragraph is set to align right in LTR, then it should be aligned to the left when using RTL?

#6 @sabernhardt
4 years ago

  • Keywords needs-patch added; has-patch 2nd-opinion removed
  • Milestone Future Release → 6.1

Twenty Twenty's style.css has /*rtl:ignore*/ for the .has-text-align-left, but that is missing for .has-text-align-right. As a result, the theme overrides ​block library styles on the front end (and not in the editor).

The patch will need to update both style.css and style-rtl.css.

#7 @sabernhardt
4 years ago

#55825 was marked as a duplicate.

@hasanuzzamanshamim
4 years ago

Patch created for rtl issue

#8 @hasanuzzamanshamim
4 years ago

  • Keywords has-patch added; needs-patch removed

I think /*rtl:ignore*/ comment will solve this issue.

#9 @sabernhardt
4 years ago

  • Keywords commit added

That patch works for me.

#10 @audrasjb
4 years ago

  • Owner set to audrasjb
  • Status new → reviewing

Self assigning for final testing and commit.

#11 @audrasjb
4 years ago

  • Resolution → fixed
  • Status reviewing → closed

In 53471:

Twenty-Twenty: Fix paragraph block alignment issues when used on a RTL website.

Twenty Twenty's style.css file has /*rtl:ignore*/ for the .has-text-align-left class, but that was previously missing from the .has-text-align-right class. As a result, the theme overrides block library styles on the front-end (and not in the editor). This changeset adds the missing declaration.

Props amirkamizi, mayankmajeji, ianbelanger, sabernhardt, hasanuzzamanshamim.
Fixes #49447.

Note: See TracTickets for help on using tickets.