Skip to content

Commit

Permalink
Fix: Permalink editor rtl languages
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Feb 18, 2019
1 parent d80e15b commit 04194de
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 12 deletions.
26 changes: 14 additions & 12 deletions packages/edit-post/src/components/sidebar/post-link/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,20 @@ function PostLink( {
<p className="edit-post-post-link__preview-label">
{ __( 'Preview' ) }
</p>
<ExternalLink
className="edit-post-post-link__link"
href={ postLink }
target="_blank"
>
{ isEditable ?
( <Fragment>
{ prefixElement }{ postNameElement }{ suffixElement }
</Fragment> ) :
postLink
}
</ExternalLink>
<div className="edit-post-post-link__preview-link-container">
<ExternalLink
className="edit-post-post-link__link"
href={ postLink }
target="_blank"
>
{ isEditable ?
( <Fragment>
{ prefixElement }{ postNameElement }{ suffixElement }
</Fragment> ) :
postLink
}
</ExternalLink>
</div>
</PanelBody>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
12 changes: 12 additions & 0 deletions packages/editor/src/components/post-permalink/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit 04194de

Please sign in to comment.