Skip to content

Platform: Apply text-wrap: pretty; across all paragraphs and headings #100475

@jasmussen

Description

@jasmussen

A typographic widow is what happens when text wraps and puts a single word on the second line, e.g.:

One year on and what next for remote
working?

Applying text-wrap: pretty; avoids that, making a better wrapping:

One year on and what next for
remote working?

While many typographic widows can be avoided editorially, applying pretty avoids them in responsive contexts as well. This should be applied globally across the entire platform, as part of a baseline set of CSS:

/* Progressive enhancement to reduce widows and orphans. */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption {
    text-wrap: balance; /* Fallback for Safari/Firefox which do not support pretty. */
    text-wrap: pretty;
}
p {
    text-wrap: pretty; /* Omit the Safari/Firefox fallbacks, as balance is too agressive for paragraphs. */
}

Metadata

Metadata

Labels

[Feature Group] Appearance & ThemesFeatures related to the appearance of sites.[Feature] CustomizerThe site customizer for traditional, non-block themes.[Feature] Global StylesThe Global Styles tools in the site editor and theme style variations.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions