Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force link text to wrap in the Link UI when encountering extra long link text #33753

Merged
merged 2 commits into from
Jul 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ $preview-image-height: 140px;
.block-editor-link-control__search-item {
position: relative;
display: flex;
align-items: center;
align-items: flex-start; // when link text is very long it is important this indicator remains visible and thus should be aligned top.
font-size: $default-font-size;
cursor: pointer;
background: $white;
Expand Down Expand Up @@ -168,7 +168,12 @@ $preview-image-height: 140px;
align-items: flex-start;
margin-right: $grid-unit-10;
overflow: hidden;
white-space: nowrap;

// Force text to wrap to improve UX when encountering long lines
// 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;
}

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