Skip to content

Commit

Permalink
Fix wordbreak for URLs (#36993)
Browse files Browse the repository at this point in the history
* Fix wordbreak for URLs

* Use break-all instead.

* Remove overflow-wrap.

* prefer the new css prop `overflow-wrap`

* Only apply to URL.

Co-authored-by: ntsekouras <ntsekouras@outlook.com>
  • Loading branch information
2 people authored and noisysocks committed Dec 6, 2021
1 parent dea2700 commit 367a9c6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/block-editor/src/components/link-control/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,16 @@ $preview-image-height: 140px;
// of text, particular those with no spaces.
// See: https://github.com/WordPress/gutenberg/issues/33586#issuecomment-888921188
white-space: pre-wrap;
word-wrap: break-word;
overflow-wrap: break-word;

.block-editor-link-control__search-item-info {
word-break: break-all;
}
}

&.is-preview .block-editor-link-control__search-item-header {
display: flex;
flex: 1; // fill available space.
flex: 1; // Fill available space.
}

&.is-error .block-editor-link-control__search-item-header {
Expand Down

0 comments on commit 367a9c6

Please sign in to comment.