diff --git a/packages/block-editor/src/components/rich-text/style.scss b/packages/block-editor/src/components/rich-text/style.scss index 5a2e7155e58002..cae87d5129b83e 100644 --- a/packages/block-editor/src/components/rich-text/style.scss +++ b/packages/block-editor/src/components/rich-text/style.scss @@ -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; diff --git a/packages/block-library/src/button/editor.scss b/packages/block-library/src/button/editor.scss index 713e508bef0553..1b8a089ba6789f 100644 --- a/packages/block-library/src/button/editor.scss +++ b/packages/block-library/src/button/editor.scss @@ -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; } } diff --git a/packages/block-library/src/button/style.scss b/packages/block-library/src/button/style.scss index 9fb53733a2d132..a9006f488d5e7b 100644 --- a/packages/block-library/src/button/style.scss +++ b/packages/block-library/src/button/style.scss @@ -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,