Skip to content

Add text-wrap: pretty; as a global toggle option #55190

@jasmussen

Description

@jasmussen

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 to balance where pretty works slightly differently. The example from that post, shown here, features a typographic widow:

One year on and what next for remote
working?

The CSS property "balanced" would enable that heading to wrap instead like this:

One year on and what
next for remote working?

The other one, "pretty", would wrap it specifically to avoid the typographic widow:

One year on and what next for
remote working?

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:

Text-Wrap i4

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 add text-wrap: balance; as a fallback.

See #62233 for an example

Issue updated Aug 13.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonNeeds DevReady for, and needs developer efforts[Feature] Design ToolsTools that impact the appearance of blocks both to expand the number of tools and improve the experi[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    Status

    Needs Dev

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions