v151 · css · typography
CSS ruby-overhang property
A new property that controls whether ruby annotation text can overhang into adjacent whitespace or CJK punctuation. Default auto matches established typographic practice — no awkward layout gaps, no decorations bleeding into adjacent glyphs.
concepts
-
Ruby Overhang Toggle
A line of furigana-annotated Japanese text. Toggle between
auto,spaces, andnoneand see the overhang behaviour change in place. -
Vertical Writing & Punctuation Overhang
The CSSWG issue (#5912) that motivated aliasing
nonetospaces. A vertical-rl Japanese passage plus a side-by-side punctuation strip showing why purists wanted overhang over CJK punctuation kept on by default. -
Reading Passage
A full paragraph of furigana-annotated Japanese prose. Toggle between
auto,spaces, and the legacynonealias while low-vision mode increases annotation size and contrast. -
Prose Comparator
Same paragraph rendered side-by-side with
auto,spaces, and the legacynonealias for Japanese furigana, Chinese pinyin, and Korean transliteration. Overlay a character-cell ruler to see exactly where annotations spill past their base. -
Furigana Density Stress
Crank the density and rt length to force the annotation past the base. Compare
autowith the constrained alias path while real-time line, height, and rendered rt/rb width metrics show the layout cost. -
Locale & Script Matrix
Six annotation systems — Japanese furigana, Mandarin pinyin, Traditional Chinese bopomofo, Japanese vertical writing, long-annotation stress, and CJK punctuation — rendered with
auto,spaces, andnonesimultaneously. Toggle to a single value to compare across scripts. -
Content Authoring Tool
Build your own ruby-annotated text by adding base + annotation pairs. Load presets (Japanese furigana, Mandarin pinyin, Korean, Bopomofo), toggle
ruby-overhanglive, switch between horizontal and vertical writing mode, and copy the generated HTML + CSS. -
Accessibility & i18n Audit
Paste HTML containing
<ruby>elements. Flags: missing<rp>fallback brackets, empty<rt>annotations, missinglangattributes, and disproportionately long annotations. Calculates the annotation-to-base ratio and suggests the appropriateruby-overhangvalue. Five example forms included.
why it shipped
Ruby annotations (furigana in Japanese, bopomofo in Mandarin, and so on) often have wider text on top than the base text they annotate. Without overhang, the line gets pushed apart with whitespace to accommodate the annotation, breaking the visual rhythm. With overhang, the annotation can extend past the base text into adjacent whitespace or CJK punctuation that has natural breathing room. The property gives authors explicit control over a typographic detail Chrome has been guessing at.
references
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗