Foundations
Typography
Three faces, one job each. Roboto Serif gives Kanso its voice, Roboto Flex runs the interface and Roboto Mono sets the numbers. All three are variable fonts under the SIL Open Font License, the faces the Kanso Labs brand uses, and both libraries ship them. The Typography view shows every style with its sample.
The scale, live
1 capsule · was due at 13:00t-body
15px / 20px
Tinta e papel, uma cor por produto.t-body-large
17px / 26px
Shared with Ada and Gracet-body-small
14px / 20px
Call the building managert-body-strong
16px / 22px
7-day average 133.68t-caption
12px / 16px
3 things need yout-display
44px / 52px
+106.20t-figure
15px / 20px
1,240.50t-figure-large
24px / 30px
15:00t-figure-small
13px / 18px
3 things need yout-headline
34px / 40px
241.86t-hero
52px / 58px
Tuesday, 1 December · 14:32t-label
13px / 18px
Mark as donet-label-strong
15px / 20px
Later todayt-section
22px / 28px
Weekly reviewt-title
32px / 38px
The faces
| Family | Face | Job |
|---|---|---|
--font-voice | Roboto Serif, light (300) | Page titles, section titles, the spotlight title, dialog titles and the hero number. |
--font-plain | Roboto Flex | Everything you read or press in the interface: rows, labels, buttons, fields, captions. |
--font-mono | Roboto Mono, tabular | Amounts, times and counts in rows, tables, meters and fields, so they line up. |
In code the families are --kui-typography-font-family-voice, -plain and -mono, with -brand holding the serif for the components' display, headline and titleLarge roles. The serif is set light, so headlines never compete with the content. It appears in large sizes only: below 22px, use Roboto Flex.
Kanso's scale
| Style | Size / line | Use |
|---|---|---|
t-hero | 52 / 58, serif 300 | The one number that matters on a screen. |
t-display | 44 / 52, serif 300 | Page titles on wide windows. |
t-headline | 34 / 40, serif 300 | Page titles on phones. |
t-title | 32 / 38, serif 300 | The spotlight card's title. |
t-section | 22 / 28, serif 300 | Section, dialog and empty-state titles. |
t-body-large | 17 / 26 | Long text and documentation. |
t-body-strong | 16 / 22, 500 | Row titles. |
t-body | 15 / 20 | Body text and field values. |
t-body-small | 14 / 20 | Dense web views. |
t-label-strong | 15 / 20, 600 | Button labels and card titles. |
t-label | 13 / 18, 500 | Labels above fields, date lines, eyebrows. |
t-caption | 12 / 16, 500 | Captions and navigation labels. |
t-figure-large | 24 / 30, mono 500 | A figure that leads a web card. |
t-figure | 15 / 20, mono 500 | Amounts and counts in rows and tables. |
t-figure-small | 13 / 18, mono 500 | Times at the start of a row. |
Using the scale in Kanso UI
Texttakes the 15 Material Design roles today,displayLargetolabelSmall, and the components set their own text with them. Head pages withheadlineMediumorheadlineLarge, cards and dialogs with the title roles, and set running text inbodyMedium.- Kanso's styles are
t-classes in this system's tokens.css, for a design's own elements, and--kui-typography-t-*custom properties in code (--kui-typography-t-hero-size,-line-height,-weight,-font,-tracking). Textmoves to Kanso's scale with the type release, and each family's labels with that family's release.CurrencyandCodeset themselves in mono and take no size of their own: put them inside aText. Figure, which will set the hero number and every other figure, is coming.
Rules
- Do use one
t-heroper screen at most, and only for a number. - Do set every amount and time in mono, including the ones inside a row's trailing slot.
- Do keep line length near 65 characters for running text;
Container'smaxInlineSizeholds a measure. - Don't bold the serif to make it louder: make it larger, or use Roboto Flex.
- Don't set labels in capitals. Kanso writes sentence case everywhere, so screen readers and the eye read the same thing.
- Don't mix faces inside one line, except a mono figure inside plain text.
Numbers and dates
Figures follow the person's locale, and I18nProvider is what sets it: wrap the app in it, and Currency, the date and time components and every number a component writes follow it. Use the real minus sign (U+2212, −), never a hyphen; durations as 1 h 32 and 25 min; dates long in titles (Tuesday, 1 December) and short in rows (30 Nov).