v130 · css
Update the syntax of `text-wrap` to match the new spec
Updates the CSS syntax for the CSS white-space and text-wrap properties to match the spec and other browsers.
concepts
-
text-wrap value picker
Pick one of the canonical spec values (
wrap,nowrap,balance,pretty,stable) and render a sample paragraph against each. -
Shorthand decomposition
The spec re-shape —
text-wrapbecomes a real shorthand. Pick a shorthand input; the demo shows the engine'stext-wrap-modeandtext-wrap-stylelonghand values plus a 2×4 grid mapping every longhand combination to its shorthand input. -
Recipe gallery
Six real-world recipes — display headline, card title, table cell, button label, blockquote, hero subhead — each rendered at four values:
wrap,balance,pretty,nowrap. The right tool per recipe annotated. -
balance vs pretty
Resize the container and switch text types to feel the algorithmic difference:
balanceequalises line lengths for short headings;prettyprevents orphans in long paragraphs without reflow overhead. -
Stable Editing
text-wrap: stableis the editing-optimised value. Type in acontenteditableand watch adjacent lines stay put — compared tobalancewhich reflows every line on each keystroke. Includes a value reference table mapping each shorthand to itstext-wrap-modeandtext-wrap-stylelonghands. -
Context-Aware text-wrap
Five UI elements (headline, card title, body, code label, button) with live text-wrap value pickers. Each shows the spec-aligned longhand decomposition (
text-wrap-mode+text-wrap-style) and flags the recommended value for that context.
why it shipped
This feature improves the interoperability with other browsers, as both Gecko and WebKit are shipping the new syntax.