Skip to content

Commit

Permalink
Code block: set LTR direction for RTL languages (WordPress#65891)
Browse files Browse the repository at this point in the history
* style.scss direction and alignment

* editor.scss direction and alignment

* Revert changes to `editor.scss`

* Switch `left` to `initial` and add comment

Co-authored-by: sabernhardt <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: ankitpanchal75 <[email protected]>
Co-authored-by: torounit <[email protected]>
  • Loading branch information
5 people authored and karthick-murugan committed Nov 13, 2024
1 parent bec03e0 commit 6462732
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/block-library/src/code/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,10 @@
font-family: inherit;
overflow-wrap: break-word;
white-space: pre-wrap;
// Set direction and avoid inheriting alignment from a parent element.
/*!rtl:begin:ignore*/
direction: ltr;
text-align: initial;
/*!rtl:end:ignore*/
}
}

0 comments on commit 6462732

Please sign in to comment.