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 Aug 20, 2019
1 parent d63306d commit 28a7785
Show file tree
Hide file tree
Showing 3 changed files with 37 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">
{ postTypeLabel || __( 'View Post' ) }
</p>
<ExternalLink
className="edit-post-post-link__link"
href={ postLink }
target="_blank"
>
{ isEditable ?
( <>
{ prefixElement }{ postNameElement }{ suffixElement }
</> ) :
postLink
}
</ExternalLink>
<div className="edit-post-post-link__preview-link-container">
<ExternalLink
className="edit-post-post-link__link"
href={ postLink }
target="_blank"
>
{ isEditable ?
( <>
{ prefixElement }{ postNameElement }{ suffixElement }
</> ) :
postLink
}
</ExternalLink>
</div>
</PanelBody>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,13 @@
}

.edit-post-post-link__link {
text-align: left;
word-wrap: break-word;
display: block;
}

/* rtl:begin:ignore */
.edit-post-post-link__preview-link-container {
direction: ltr;
}
/* rtl:end:ignore */
15 changes: 15 additions & 0 deletions packages/editor/src/components/post-permalink/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@

&::after {
@include long-content-fade($size: 20%, $edge: 1px);
right: 0;
right: 0;
}
text-align: left;
}

.editor-post-permalink-editor {
Expand Down Expand Up @@ -131,3 +134,15 @@
margin-right: 6px;
flex: 0 0 0%;
}

.editor-post-permalink-editor__prefix {
text-align: left;
}

/* rtl:begin:ignore */
.editor-post-permalink__editor-container,
.editor-post-permalink__link {
direction: ltr;
}
/* rtl:end:ignore */

0 comments on commit 28a7785

Please sign in to comment.