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 27, 2019
1 parent 845185b commit bccf734
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">
{ __( '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 @@ -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 @@ -53,7 +53,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 @@ -110,3 +113,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 bccf734

Please sign in to comment.