Skip to content

Commit

Permalink
Button Block: fix space insertion (#14925)
Browse files Browse the repository at this point in the history
* Button Block: fix space insertion

* Typo

* Allow rule for preview
  • Loading branch information
ellatrix authored Apr 12, 2019
1 parent 71a8c65 commit 5777dbb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/rich-text/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// breaking spaces in between words. If also prevent Firefox from inserting
// a trailing `br` node to visualise any trailing space, causing the element
// to be saved.
white-space: pre-wrap;
white-space: pre-wrap !important;

> p:first-child {
margin-top: 0;
Expand Down
6 changes: 5 additions & 1 deletion packages/block-library/src/button/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@
.wp-block-button__link {
max-width: 100%;
overflow: hidden;
white-space: nowrap;
// Override is allowed here only because the rich text instance in
// a preview is not editable.
// To do: use the `save` function to preview a block transform, not
// the `edit` function.
white-space: nowrap !important;
text-overflow: ellipsis;
}
}
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ $blocks-button__height: 56px;
padding: 12px 24px;
text-align: center;
text-decoration: none;
white-space: normal;
overflow-wrap: break-word;

&:hover,
Expand Down

0 comments on commit 5777dbb

Please sign in to comment.