From 04194de6c4f9040dedb6729368b1ec3014796721 Mon Sep 17 00:00:00 2001 From: Jorge Date: Mon, 18 Feb 2019 12:13:49 +0000 Subject: [PATCH] Fix: Permalink editor rtl languages --- .../src/components/sidebar/post-link/index.js | 26 ++++++++++--------- .../components/sidebar/post-link/style.scss | 7 +++++ .../src/components/post-permalink/style.scss | 12 +++++++++ 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/packages/edit-post/src/components/sidebar/post-link/index.js b/packages/edit-post/src/components/sidebar/post-link/index.js index 6b85cb8739a462..dfce9315e04fa8 100644 --- a/packages/edit-post/src/components/sidebar/post-link/index.js +++ b/packages/edit-post/src/components/sidebar/post-link/index.js @@ -98,18 +98,20 @@ function PostLink( {

{ __( 'Preview' ) }

- - { isEditable ? - ( - { prefixElement }{ postNameElement }{ suffixElement } - ) : - postLink - } - +
+ + { isEditable ? + ( + { prefixElement }{ postNameElement }{ suffixElement } + ) : + postLink + } + +
); } diff --git a/packages/edit-post/src/components/sidebar/post-link/style.scss b/packages/edit-post/src/components/sidebar/post-link/style.scss index a20084e63ab241..84ad8ad0a9a3f8 100644 --- a/packages/edit-post/src/components/sidebar/post-link/style.scss +++ b/packages/edit-post/src/components/sidebar/post-link/style.scss @@ -9,3 +9,10 @@ .edit-post-post-link__link { word-wrap: break-word; } + +/* rtl:begin:ignore */ +body.rtl .edit-post-post-link__preview-link-container { + direction: ltr; + float: right; +} +/* rtl:end:ignore */ diff --git a/packages/editor/src/components/post-permalink/style.scss b/packages/editor/src/components/post-permalink/style.scss index c35abcb009dfca..2749eb8fbffc9b 100644 --- a/packages/editor/src/components/post-permalink/style.scss +++ b/packages/editor/src/components/post-permalink/style.scss @@ -110,3 +110,15 @@ margin-right: 6px; flex: 0 0 0%; } + +/* rtl:begin:ignore */ +body.rtl .editor-post-permalink { + direction: ltr; + .editor-post-permalink__edit { + float: left; + } + .editor-post-permalink__link::after { + @include long-content-fade($direction: left, $size: 20%, $edge: 1px); + } +} +/* rtl:end:ignore */