interop icon indicating copy to clipboard operation
interop copied to clipboard

Hanging punctuation

Open clagnut opened this issue 5 months ago • 3 comments

Description

The hanging-punctuation property specifies whether a punctuation mark should hang at the start or end of a line of text. Hanging punctuation may be placed outside the line box.

For example, the property can hang the opening quote in the margin when left-aligned, or the closing quote when right-aligned:

“One more attribute the modern typographer must have: the capacity for taking great pains with seemingly unimportant detail. To them, one typographical point must be as important as one inch, and they must harden their heart against the accusation of being too fussy.”

If the text is centred, the layout should effectively ignore the presence of the opening and closing punctuation, layout the text as if they weren't present and add them in afterwards, thus giving more professional layout.

Safari (alone) currently supports hanging-punctuation: first to hang the opening quote (including with centred text as described). No browser supports hanging-punctuation: last for hanging the last quote, including Safari.

See demo/test.

More details in MDN.

Specification

https://www.w3.org/TR/css-text-3/#hanging

web-feature

https://web-platform-dx.github.io/web-features-explorer/features/hanging-punctuation/

Test Links

demo/test

Additional Signals

Firefox bug Chromium bug

clagnut avatar Sep 06 '25 16:09 clagnut