Skip to main content
Neighborhood Design System v5.0.0-rc.2

Sizing

Container widths and the size scales for icons, controls, indicators and media.

Use the semantic size tokens, --nbhd-size-*, for the dimensions of icons, controls and media in your CSS. Each one is named for what it sizes and points to a step of the base size scale (--nbhd-size-icon-sm → --nbhd-base-size-16). Components use the same tokens.

Container sizes set the narrowest layout Neighborhood supports and the widest a content container grows before it centers on the page.

.page {
  min-inline-size: var(--nbhd-size-container-min);
  max-inline-size: var(--nbhd-size-container-max);
  margin-inline: auto;
}

Size an icon from the icon scale and a clickable target from the control scale, so they match the icons and buttons inside Neighborhood components.

.toolbar-button {
  block-size: var(--nbhd-size-control-xl);
  inline-size: var(--nbhd-size-control-xl);
}

.toolbar-button svg {
  block-size: var(--nbhd-size-icon-md);
  inline-size: var(--nbhd-size-icon-md);
}

--nbhd-size-control-xl (44px) meets the WCAG minimum target size. Use it for anything people tap on a touch screen.

Size tokens don’t change with a brand’s spacing step, so an icon is the same size on Moen’s 5px grid as on the default 4px grid. Use the space scale for the gaps around an element, not for the element’s own size.

Container

TokenCSS VariableValue
size.container.minvar(--nbhd-size-container-min)320px
size.container.maxvar(--nbhd-size-container-max)1300px

Icon

TokenCSS VariableValue
size.icon.xsvar(--nbhd-size-icon-xs)10px
size.icon.smvar(--nbhd-size-icon-sm)16px
size.icon.mdvar(--nbhd-size-icon-md)20px
size.icon.lgvar(--nbhd-size-icon-lg)24px
size.icon.xlvar(--nbhd-size-icon-xl)32px
size.icon.xxlvar(--nbhd-size-icon-xxl)48px

Control

TokenCSS VariableValue
size.control.smvar(--nbhd-size-control-sm)28px
size.control.mdvar(--nbhd-size-control-md)32px
size.control.lgvar(--nbhd-size-control-lg)40px
size.control.xlvar(--nbhd-size-control-xl)44px

Indicator

TokenCSS VariableValue
size.dotvar(--nbhd-size-dot)8px
size.trackvar(--nbhd-size-track)8px

Media

TokenCSS VariableValue
size.thumbnailvar(--nbhd-size-thumbnail)56px
size.hero.minBlockSizevar(--nbhd-size-hero-minBlockSize)800px
size.hero.logo.maxInlineSizevar(--nbhd-size-hero-logo-maxInlineSize)190px
size.hero.logo.maxBlockSizevar(--nbhd-size-hero-logo-maxBlockSize)120px
Esc
↑ ↓ to move↵ to open