Vietnamese text gets taller line heights, so its stacked marks never touch the line above or get cut off.
Text marked lang="vi" gets taller line heights. Vietnamese stacks two marks on some capitals, such as Ấ, Ổ and Ẫ, so they rise well above the other letters. At English line heights those marks touch the line above and are cut off in one-line elements that clip their overflow, such as truncated table cells and button labels.
Line height is the space from one line to the next, so it shows on text of two lines or more. Each shaded band below is one line:
Orders sync every 5 minutes.
Index, Item and Order lists.
Online store to the ERP.
Ổn định đơn hàng mỗi 5 phút.
Ấn Độ, Ẫm và Ở đây có ưu đãi.
Ổn định, Ấn Độ, Ẫm.
Ổn định đơn hàng mỗi 5 phút.
Ấn Độ, Ẫm và Ở đây có ưu đãi.
Ổn định, Ấn Độ, Ẫm.
The Vietnamese layer changes line height only; size, weight and typeface stay the same. Each value is the smallest multiple of 4 px that keeps every Vietnamese letter inside its own line box, so marks neither touch the line above nor get clipped.
| Style | English | Vietnamese |
|---|---|---|
display.large |
72/80 | 72/108 |
display.medium |
60/68 | 60/88 |
display.small |
48/56 | 48/72 |
heading.xlarge |
32/40 | 32/48 |
heading.large |
24/32 | 24/40 |
heading.medium |
20/28 | 20/32 |
heading.small |
16/24 | 16/24 (same) |
heading.xsmall |
14/20 | 14/24 |
body.large |
16/24 | 16/24 (same) |
body.default |
14/20 | 14/24 |
body.small |
12/16 | 12/20 |
label.default |
14/20 | 14/24 |
label.small |
12/16 | 12/20 |
code.default |
14/20 | 14/20 (same) |
Each box below is one line that clips its overflow, with the line box outlined.
- Mark the language. Set
lang="vi"on<html>for a Vietnamese page, or on the element that holds Vietnamese text. Text marked with another language inside it, such aslang="en", goes back to the English values. - Use the tokens. The text style tokens switch on their own under
lang="vi"(:lang(vi)intokens.css). Code that can’t read CSS variables, such as a theme object in JavaScript, takes thevivalues fromtokens.js. - Let components grow. A control or row that sets a fixed height must fit the Vietnamese line height: a 14 px label needs 24 px of line, so set heights from padding plus line height, not as a fixed number.
- Don’t clip text vertically. Avoid
overflow: hiddenon a box with no vertical padding; when you must truncate, clip horizontally and let the line box hold the marks. - Test with this string in every component and state: ỔN ĐỊNH · ẤN ĐỘ · ẪM · Ở ĐÂY CÓ ƯU ĐÃI.
JetBrains Mono draws Vietnamese marks inside its own line box, so code.default keeps 14/20. This site serves its Vietnamese subset too, so Vietnamese in code doesn’t fall back to another typeface.