concept
Ruby formatting context — CSS reference
Ruby uses a specialized inline layout with bases and associated annotations. Annotation boxes participate in ruby layout and line sizing rather than occupying an unrelated flex row.
Formal Syntax & Structure
css syntaxcss
ruby { ruby-position: over; }Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>Ruby formatting context</title><style>body{margin:8px;font:32px/1.5 monospace;color:#172033;background:white}rt{font:16px/1.2 monospace}math{font-size:40px}#r{ruby-position:over}</style><body><p><ruby id="r"><span id="b">Tokyo</span><rt id="t">to-kyo</rt></ruby></p></body></html>