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

Update instances of text-wrap: pretty to fall back to balance #62233

Merged
merged 3 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Enhancements

- Add `text-wrap: balance` fallback to all instances of `text-wrap: pretty` for greater cross browser compatibility. ([#62233](https://github.com/WordPress/gutenberg/pull/62233))

## 28.0.0 (2024-05-31)

### Breaking Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ exports[`DimensionControl rendering renders with custom sizes 1`] = `
color: #1e1e1e;
line-height: 1.4;
margin: 0;
text-wrap: balance;
text-wrap: pretty;
font-size: calc((13 / 13) * 13px);
font-weight: normal;
Expand Down Expand Up @@ -347,6 +348,7 @@ exports[`DimensionControl rendering renders with defaults 1`] = `
color: #1e1e1e;
line-height: 1.4;
margin: 0;
text-wrap: balance;
text-wrap: pretty;
font-size: calc((13 / 13) * 13px);
font-weight: normal;
Expand Down Expand Up @@ -636,6 +638,7 @@ exports[`DimensionControl rendering renders with icon and custom icon label 1`]
color: #1e1e1e;
line-height: 1.4;
margin: 0;
text-wrap: balance;
text-wrap: pretty;
font-size: calc((13 / 13) * 13px);
font-weight: normal;
Expand Down Expand Up @@ -937,6 +940,7 @@ exports[`DimensionControl rendering renders with icon and default icon label 1`]
color: #1e1e1e;
line-height: 1.4;
margin: 0;
text-wrap: balance;
text-wrap: pretty;
font-size: calc((13 / 13) * 13px);
font-weight: normal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ exports[`props should render correctly 1`] = `
color: #1e1e1e;
line-height: 1.4;
margin: 0;
text-wrap: balance;
text-wrap: pretty;
color: #1e1e1e;
font-size: calc(1.95 * 13px);
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/text/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const Text = css`
color: ${ COLORS.gray[ 900 ] };
line-height: ${ CONFIG.fontLineHeightBase };
margin: 0;
text-wrap: balance; /* Fallback for Safari. */
text-wrap: pretty;
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ exports[`Text should render highlighted words with highlightCaseSensitive 1`] =
color: #1e1e1e;
line-height: 1.4;
margin: 0;
text-wrap: balance;
text-wrap: pretty;
font-size: calc((13 / 13) * 13px);
font-weight: normal;
Expand Down Expand Up @@ -54,6 +55,7 @@ exports[`Text snapshot tests should render correctly 1`] = `
color: #1e1e1e;
line-height: 1.4;
margin: 0;
text-wrap: balance;
text-wrap: pretty;
font-size: calc((13 / 13) * 13px);
font-weight: normal;
Expand Down
1 change: 1 addition & 0 deletions packages/editor/src/components/post-panel-row/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
.components-button {
max-width: 100%;
text-align: left;
text-wrap: balance; // Fallback for Safari.
text-wrap: pretty;
height: auto;
min-height: $button-size-compact;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@

.components-panel__body-title .components-button {
align-items: flex-start;
text-wrap: balance; // Fallback for Safari.
text-wrap: pretty;
}
}
Expand Down
Loading