From b002291caa45e6648fb872b8525a1c079f54649a Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" Date: Mon, 14 Oct 2024 07:23:05 -0500 Subject: [PATCH] Code block: set LTR direction for RTL languages (#65891) * 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 Co-authored-by: t-hamano Co-authored-by: ankitpanchal75 Co-authored-by: torounit --- packages/block-library/src/code/style.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/block-library/src/code/style.scss b/packages/block-library/src/code/style.scss index 670a4f7f1ef4c8..ccc950d19b552c 100644 --- a/packages/block-library/src/code/style.scss +++ b/packages/block-library/src/code/style.scss @@ -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*/ } }