-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add text-wrap: pretty;
as a global toggle option
#55190
Comments
Related in part: #48202 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
text-wrap: balance;
as a global toggle optiontext-wrap: pretty;
as a global toggle option
Somehow related: While |
I've found a combination of both to work nicely:
|
This comment was marked as resolved.
This comment was marked as resolved.
Would this be something we ever surface as a control in the UI too or just theme.json? |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Also just noting that See #62233 for an example |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Updated the issue and shuffled the labels to indicate, this is ready! |
I like the idea. That can be very useful while creating websites with lists or tables full of details that should not be wrapped. like pricing tables. |
This comment was marked as resolved.
This comment was marked as resolved.
Nowrap is included as the "None" option, with additional help-text below. |
The CSS feature
text-wrap: pretty;
enables line-breaks to happen in a way that avoids typographic widows. You can read a bit more here, although that refers tobalance
wherepretty
works slightly differently. The example from that post, shown here, features a typographic widow:The CSS property "balanced" would enable that heading to wrap instead like this:
The other one, "pretty", would wrap it specifically to avoid the typographic widow:
The feature is useful for headings and captions especially, and it would be nice if there was a way to apply this in the block editor.
Proposed solution
In global styles, as part of the typography panel, add options to adjust the text-balance:
These properties should ideally show up only in Global Styles, as they are not useful on a per-block basis.
**Note: **
text-wrap: pretty;
still isn't supported in safari & firefox. So if that option is chosen, it should should addtext-wrap: balance;
as a fallback.See #62233 for an example
Issue updated Aug 13.
The text was updated successfully, but these errors were encountered: