jsp-dsv0.1

Spacingjsp

Two spacing scales – component and layout – plus control and icon sizes, page gutters, container widths and seven breakpoints. Layout spacing and control sizes step up at the breakpoints on their own.

Foundation
Source
tokens/semantic/spacing.json · size.json · layout.json
Base
A 4-pixel grid
  • Two scales

    *-component-* inside a component; *-layout-* between blocks and sections.

  • Responsive

    Tokens marked with steps grow at the breakpoints – no breakpoint prefixes in page code.

  • Sizes

    h-control-* for controls, size-icon-* for icons, max-w-site-* for columns.

Component spacing

Padding and gaps inside a component: p-component-md, gap-component-sm. Fixed at every width.

TokenBaseNow
space.component.3xs2px…
space.component.2xs4px…
space.component.xs8px…
space.component.sm12px…
space.component.md16px…
space.component.lg24px…
space.component.xl32px…

Layout spacing

Gaps between blocks and sections: gap-layout-md, py-layout-lg. Section's padding prop uses these. Resize the window to see Now change.

TokenBaseNow
space.layout.sm16px…
space.layout.md24px…
space.layout.lg32px…
space.layout.xl48px…

Control sizes

Heights shared by buttons and inputs, so controls of a size line up. shadcn's components keep their own sizes (ISS-03); the JSP tier and page code use h-control-*.

TokenBaseNow
size.control.xs32px…
size.control.sm32px…
size.control.md32px…
size.control.lg32px…

shadcn controls, as installed

Horizontal padding inside controls

TokenBaseNow
space.control-x.xs12px…
space.control-x.sm12px…
space.control-x.md12px…
space.control-x.lg12px…

Icon sizes

size-icon-xs … xl. shadcn draws icons at icon.sm inside its controls.

xs · 12px
sm · 16px
md · 20px
lg · 24px
xl · 32px
icon.subtle

Breakpoints

Seven, smallest first. Prefixes are xs: sm: md: lg: xl: xxl: – there is no 2xl:. Use them for layout changes only.

This window is at…
  1. xxs:0px0px – 399px · smallest phones and up.
  2. xs:400px400px – 559px · large phones.
  3. sm:560px560px – 767px · phones in landscape, small tablets.
  4. md:768px768px – 999px · tablets in portrait.
  5. lg:1000px1000px – 1439px · tablets in landscape, small laptops.
  6. xl:1440px1440px – 1799px · laptops and desktops.
  7. xxl:1800px1800px and up · wide desktops.

Containers

Maximum widths for a column: max-w-site-xs … xxl, prose for reading and form for forms. Container's width prop uses them.

TokenBaseNow
layout.container.xs368px…
layout.container.sm528px…
layout.container.md720px…
layout.container.lg960px…
layout.container.xl1280px…
layout.container.xxl1440px…
layout.container.prose640px…
layout.container.form560px…

Gutters

Page side padding: px-gutter-sm … lg, or Container's gutter prop.

TokenBaseNow
layout.gutter.sm16px…
layout.gutter.md24px…
layout.gutter.lg32px…