Tokens
Space and size
Kanso's 4px spacing grid, its control and row heights, and the sizes of icons and avatars.
Read from kanso-ui 0.59.0’s tokens.css, whose tokens are kanso-ui-core 0.8.0’s, with the usage notes of that release. Contrast is measured here, as WCAG 2 defines it.
Spacing
A 4px grid, with two steps between steps: xs-plus between xs and sm, and lg-plus between lg and xl. kanso-ui's Stack `gap` takes the same step names. Kanso's own, `kui-spacing-kanso-*`: A 4px grid. Every gap and inset is one of these steps.
--kui-spacing-kanso-2xl24pxGaps between blocks on the web; the dialog's padding.
--kui-spacing-kanso-2xs2pxBetween two lines of one row (title and supporting line).
--kui-spacing-kanso-3xl32pxPage gutters on the web.
--kui-spacing-kanso-4xl40pxPage gutters on wide windows; space before a page's footer.
--kui-spacing-kanso-5xl56pxDocumentation pages and covers.
--kui-spacing-kanso-lg16pxThe default inset: card padding, the phone's side margin, the gap inside a card.
--kui-spacing-kanso-md12pxBetween a row's lead and its text; the gap between cards in a phone column.
--kui-spacing-kanso-sm8pxBetween buttons of a group, an icon and its label, chips in a row.
--kui-spacing-kanso-xl20pxThe spotlight card's padding; space above a section title.
--kui-spacing-kanso-xs4pxInside tight groups: a segmented control's inset, icon and label in a navigation item.
Sizing
Container heights and icon sizes from the Material Design spec pages. A component takes the step its spec names; an icon takes a step as its font size. Kanso's own, `kui-sizing-kanso-*`: Control heights, row heights, icons and avatars. Touch targets are never under 48px on phones, and never under 32px on the web.
--kui-sizing-kanso-avatar-lg56pxThe spotlight card's lead.
--kui-sizing-kanso-avatar-md36pxAvatars that lead a list row; the signed-in person in an app bar.
--kui-sizing-kanso-avatar-sm28pxAvatar stacks beside a title.
--kui-sizing-kanso-control-lg48pxDefault controls on phones: buttons, fields, icon buttons, the minimum touch target.
--kui-sizing-kanso-control-md40pxDefault controls on the web: buttons and fields.
--kui-sizing-kanso-control-sm32pxCompact controls on the web: small buttons, segments inside a dense toolbar.
--kui-sizing-kanso-control-xl56pxThe FAB and the spotlight card's main action.
--kui-sizing-kanso-icon-lg24pxStandalone icons: navigation, icon buttons, list leads.
--kui-sizing-kanso-icon-md20pxIcons inside buttons, fields and alerts.
--kui-sizing-kanso-icon-sm16pxIcons inside badges and dense text.
--kui-sizing-kanso-icon-xl40pxEmpty states and large leads.
--kui-sizing-kanso-row-compact44pxTable rows and one-line rows on the web.
--kui-sizing-kanso-row60pxTwo-line list rows on phones.
Material Design steps
--kui-spacing-lg-plus20pxBetween lg and xl: a 20px inset where a component's spec gives one, such as either side of an expanded rail's destinations.
--kui-spacing-lg16pxThe default padding: card and field insets, the page gutter on compact windows.
--kui-spacing-md12pxPadding inside compact containers and gaps between list content.
--kui-spacing-sm8pxGaps between related controls: buttons in a row, chips in a group.
--kui-spacing-xl24pxPadding in dialogs and between sections of a card.
--kui-spacing-xs-plus6pxBetween xs and sm: a 6px offset where a component's spec gives one, such as above a destination's indicator.
--kui-spacing-xs4pxTight gaps inside a control: icon to label in a chip.
--kui-spacing-xxl32pxGaps between page sections.
--kui-spacing-xxs2pxHairline gaps: a badge's offset, the space between a label and its count.
--kui-spacing-xxxl40pxThe widest gap: between unrelated page regions.
--kui-sizing-control-lg56pxThe large control height: large buttons, the FAB, the search bar.
--kui-sizing-control-md48pxThe medium control height: medium buttons, tabs, the snackbar's single line.
--kui-sizing-control-sm40pxThe small control height: the default button and icon button, a segmented button.
--kui-sizing-control-xl96pxThe extra-large control height: XL buttons and the large FAB.
--kui-sizing-control-xs32pxThe extra-small control height: XS buttons and icon buttons, chips, the number field's steppers.
--kui-sizing-control-xxl136pxThe largest control height: XXL buttons and icon buttons.
--kui-sizing-icon-lg24pxThe standard icon: a standalone or icon button's glyph, a list, menu or tree row's leading and trailing icons, the navigation and the app bar.
--kui-sizing-icon-md20pxThe medium icon: inside a medium button or a field, and beside body text, such as a note or a callout.
--kui-sizing-icon-sm18pxThe small icon: inside a chip, an XS or small button's label and a segmented button.
--kui-sizing-icon-xl40pxThe large icon: an avatar's or a tile's glyph and a large icon button's.
--kui-sizing-icon-xs16pxThe extra-small icon: an icon set inside dense text, such as a status beside a supporting line.
--kui-sizing-row-lg88pxThree-line list rows.
--kui-sizing-row-md72pxTwo-line list rows.
--kui-sizing-row-sm56pxOne-line list rows and table rows.
--kui-sizing-row-xs48pxMenu items and the shortest list row.