Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
Represents a ruby annotation, used for East Asian typography to show pronunciation guides above or beside base text.
The <ruby> element represents a ruby annotation — small text above or beside base text, typically showing pronunciation. Ruby annotations are essential for East Asian typography (furigana in Japanese, pinyin in Chinese) but can also help with pronunciation guides in any language.
A ruby annotation consists of base text, ruby text (<rt>), and optional fallback parentheses (<rp>).
VB provides i18n-aware styling: CJK script fonts for ruby text, and a data-ruby visibility system to control when annotations appear.
<p> <ruby>東京<rp>(</rp><rt>とうきょう</rt><rp>)</rp></ruby>は日本の首都です。</p>
<p> <ruby>北京<rp>(</rp><rt>Běijīng</rt><rp>)</rp></ruby> is the capital of China.</p>
<ruby> 漢 <rp>(</rp><rt>かん</rt><rp>)</rp> 字 <rp>(</rp><rt>じ</rt><rp>)</rp></ruby>
<p> How to pronounce <ruby>Versailles<rp>(</rp><rt>vair-SIGH</rt><rp>)</rp></ruby>.</p>
VB's i18n system provides a data-ruby attribute on <html> to control when annotations display:
| Value | Behavior |
|---|---|
show |
Always visible |
hide |
Visually hidden, kept in DOM for screen readers |
auto |
Visible for CJK languages (ja, zh, ko), hidden otherwise |
| (absent) | Browser default (always visible) |
<html lang="ja" data-ruby="auto"><body> <!-- Ruby visible (CJK language) --> <ruby>漢字<rt>かんじ</rt></ruby> <section lang="en"> <!-- Ruby hidden (non-CJK) --> <ruby>ruby<rt>annotation</rt></ruby> </section></body></html>
/* data-ruby="show" — always visible */:root[data-ruby="show"] rt { display: block; } /* data-ruby="hide" — visually hidden, accessible */:root[data-ruby="hide"] rt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0);} /* data-ruby="auto" — visible for CJK only */:root[data-ruby="auto"] rt { /* hidden by default */ }:root[data-ruby="auto"]:lang(ja) rt,:root[data-ruby="auto"]:lang(zh) rt,:root[data-ruby="auto"]:lang(ko) rt { /* shown */ }
ruby { display: ruby;} rt { font-size: 0.5em; line-height: 1; ruby-align: center;} rp { display: none; /* hidden in supporting browsers */}
| Property | Effect |
|---|---|
ruby-position: over |
Annotation above base text (default) |
ruby-position: under |
Annotation below base text |
ruby-align: center |
Center annotation over base text (VB default) |
rt font-size |
0.5em (VB default) |
<rp> fallback ensures annotations appear in parentheses when ruby is not supporteddata-ruby="hide" mode keeps annotations in the DOM for accessibility even when visually hidden<rt> — The ruby text (annotation content)<rp> — Fallback parentheses for non-supporting browsers<bdi> — Bidirectional isolation for mixed-script text<bdo> — Bidirectional direction overrideRuby annotations are supported in all modern browsers. The ruby-position CSS property is supported in Chrome, Edge, Safari, and Firefox 38+.