ruby-alignBaseline · Newly available
The ruby-align CSS property sets the spacing and alignment of ruby annotation text when it does not fill its available space.
Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Dec 11, 2024.
Browser support
DesktopChrome
1–127Not supported
128+Supportedsince Aug 20, 2024
Current: 155Edge
12–127Not supported
128+Supportedsince Aug 22, 2024
Current: 154Firefox
1–37Not supported
38+Supportedsince May 12, 2015
Current: 157Safari
1–18.1Not supported
18.2+Supportedsince Dec 11, 2024
Current: 27MobileChrome Android
18–127Not supported
128+Supportedsince Aug 20, 2024
Current: 155Firefox Android
4–37Not supported
38+Supportedsince May 12, 2015
Current: 157Safari iOS
1–18.1Not supported
18.2+Supportedsince Dec 11, 2024
Current: 27How to use
Every current browser supports this, but it only became Baseline on Dec 11, 2024. Use it as a progressive enhancement, or keep a fallback if you support older devices.
Example
Full syntax and examples are on MDN: ruby-align.
Feature detection
CSS · check before using
@supports (ruby-align: initial) {
/* styles that rely on ruby-align */
}
/* or in JavaScript */
if (CSS.supports("ruby-align", "initial")) {
// use it
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (5). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| ruby-align | 128 | 128 | 38 | 18.2 | 128 | 38 | 18.2 |
| ruby-align.center | 128 | 128 | 38 | 18.2 | 128 | 38 | 18.2 |
| ruby-align.space-around | 128 | 128 | 38 | 18.2 | 128 | 38 | 18.2 |
| ruby-align.space-between | 128 | 128 | 38 | 18.2 | 128 | 38 | 18.2 |
| ruby-align.start | 128 | 128 | 38 | 18.2 | 128 | 38 | 18.2 |