1. Home
  2. Tokens
  3. Space and size

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-2xl

    24px

    Gaps between blocks on the web; the dialog's padding.

  • --kui-spacing-kanso-2xs

    2px

    Between two lines of one row (title and supporting line).

  • --kui-spacing-kanso-3xl

    32px

    Page gutters on the web.

  • --kui-spacing-kanso-4xl

    40px

    Page gutters on wide windows; space before a page's footer.

  • --kui-spacing-kanso-5xl

    56px

    Documentation pages and covers.

  • --kui-spacing-kanso-lg

    16px

    The default inset: card padding, the phone's side margin, the gap inside a card.

  • --kui-spacing-kanso-md

    12px

    Between a row's lead and its text; the gap between cards in a phone column.

  • --kui-spacing-kanso-sm

    8px

    Between buttons of a group, an icon and its label, chips in a row.

  • --kui-spacing-kanso-xl

    20px

    The spotlight card's padding; space above a section title.

  • --kui-spacing-kanso-xs

    4px

    Inside 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-lg

    56px

    The spotlight card's lead.

  • --kui-sizing-kanso-avatar-md

    36px

    Avatars that lead a list row; the signed-in person in an app bar.

  • --kui-sizing-kanso-avatar-sm

    28px

    Avatar stacks beside a title.

  • --kui-sizing-kanso-control-lg

    48px

    Default controls on phones: buttons, fields, icon buttons, the minimum touch target.

  • --kui-sizing-kanso-control-md

    40px

    Default controls on the web: buttons and fields.

  • --kui-sizing-kanso-control-sm

    32px

    Compact controls on the web: small buttons, segments inside a dense toolbar.

  • --kui-sizing-kanso-control-xl

    56px

    The FAB and the spotlight card's main action.

  • --kui-sizing-kanso-icon-lg

    24px

    Standalone icons: navigation, icon buttons, list leads.

  • --kui-sizing-kanso-icon-md

    20px

    Icons inside buttons, fields and alerts.

  • --kui-sizing-kanso-icon-sm

    16px

    Icons inside badges and dense text.

  • --kui-sizing-kanso-icon-xl

    40px

    Empty states and large leads.

  • --kui-sizing-kanso-row-compact

    44px

    Table rows and one-line rows on the web.

  • --kui-sizing-kanso-row

    60px

    Two-line list rows on phones.

Material Design steps

  • --kui-spacing-lg-plus

    20px

    Between 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-lg

    16px

    The default padding: card and field insets, the page gutter on compact windows.

  • --kui-spacing-md

    12px

    Padding inside compact containers and gaps between list content.

  • --kui-spacing-sm

    8px

    Gaps between related controls: buttons in a row, chips in a group.

  • --kui-spacing-xl

    24px

    Padding in dialogs and between sections of a card.

  • --kui-spacing-xs-plus

    6px

    Between xs and sm: a 6px offset where a component's spec gives one, such as above a destination's indicator.

  • --kui-spacing-xs

    4px

    Tight gaps inside a control: icon to label in a chip.

  • --kui-spacing-xxl

    32px

    Gaps between page sections.

  • --kui-spacing-xxs

    2px

    Hairline gaps: a badge's offset, the space between a label and its count.

  • --kui-spacing-xxxl

    40px

    The widest gap: between unrelated page regions.

  • --kui-sizing-control-lg

    56px

    The large control height: large buttons, the FAB, the search bar.

  • --kui-sizing-control-md

    48px

    The medium control height: medium buttons, tabs, the snackbar's single line.

  • --kui-sizing-control-sm

    40px

    The small control height: the default button and icon button, a segmented button.

  • --kui-sizing-control-xl

    96px

    The extra-large control height: XL buttons and the large FAB.

  • --kui-sizing-control-xs

    32px

    The extra-small control height: XS buttons and icon buttons, chips, the number field's steppers.

  • --kui-sizing-control-xxl

    136px

    The largest control height: XXL buttons and icon buttons.

  • --kui-sizing-icon-lg

    24px

    The 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-md

    20px

    The medium icon: inside a medium button or a field, and beside body text, such as a note or a callout.

  • --kui-sizing-icon-sm

    18px

    The small icon: inside a chip, an XS or small button's label and a segmented button.

  • --kui-sizing-icon-xl

    40px

    The large icon: an avatar's or a tile's glyph and a large icon button's.

  • --kui-sizing-icon-xs

    16px

    The extra-small icon: an icon set inside dense text, such as a status beside a supporting line.

  • --kui-sizing-row-lg

    88px

    Three-line list rows.

  • --kui-sizing-row-md

    72px

    Two-line list rows.

  • --kui-sizing-row-sm

    56px

    One-line list rows and table rows.

  • --kui-sizing-row-xs

    48px

    Menu items and the shortest list row.