Spacing and radius
Spacing follows a 4px grid. Radius steps up with the size of the element. When a large container holds a smaller element, the inner radius is one step smaller than the outer one.
Spacing
--hao-space-14px, The minimum gap between an icon and text.
--hao-space-28px, Tag padding and the gap between controls in the same group.
--hao-space-312px, Vertical padding in list rows.
--hao-space-416px, Page left and right margins and left and right padding in list rows.
--hao-space-520px, Card padding and left and right button padding.
--hao-space-624px, The distance between adjacent groups.
--hao-space-832px, White space between a large title and content.
--hao-space-1248px, White space between page sections, also the module for covers.
Radius
--hao-radius-xs6px, Checkboxes and very small marks.
--hao-radius-sm8px, Small icons, thumbnails, and the corner radius of focus rings. Seals do not use it; the seal face has its own cut corners.
--hao-radius-md12px, Buttons, input fields, and segmented controls.
--hao-radius-lg20px, Cards, list groups, and message bars.
--hao-radius-xl28px, Bottom sheets and full-screen containers.
--hao-radius-full999px, Tags, switches, and small pill buttons; perfect circles such as moon gates.
Breakpoints
| Token | Value | Use |
|---|
--hao-bp-medium | 600px | From here up is medium: tablets and narrow browser windows. The grid has 8 columns. |
--hao-bp-expanded | 840px | From here up is expanded: desktop browsers. The grid has 12 columns, and the tab bar switches to top navigation or a sidebar. |
--hao-bp-wide | 1200px | The content area no longer grows wider; the white space on both sides increases. |
Layout
| Token | Value | Use |
|---|
--hao-margin-compact | 16px | Page left and right margins for narrow screens (under 600px), with a 4-column grid. |
--hao-margin-medium | 24px | Page left and right margins for medium screens, with an 8-column grid. |
--hao-margin-expanded | 32px | Page left and right margins for wide screens, with a 12-column grid. |
--hao-gutter | 24px | Grid column gap; narrow screens use 16px (space-4). |
--hao-content-max | 1200px | The maximum width of the content area; beyond it, content is centered. |
--hao-measure | 680px | The maximum line width for long-form body text, about 38 Chinese characters or 70 English characters. |