shtukbasehub

Design scales

Spacing on a 4 px scale, font sizes from a short scale, radii and shadows from a set, line length of 45–75 characters. Checks on CSS, Tailwind classes and TSX styles; a judge looks at line length.

Packagedesign-scalesv0.1.013 files

Design scales

Norms for the sizes of an interface: spacing, font, corner radii, shadows, line length. All values come from the short lists on the page Scales; the same page says where the ideas come from (Refactoring UI, Material 3, Every Layout) and holds the settings.

What it installs

  • The page Scales.
  • Norms:
    • SCL-R01: spacing is a multiple of 4 px, 2 px below 16 px; the spacing check.
    • SCL-R02: font sizes from the scale, no more than 10 different ones; the type check.
    • SCL-R03: radii from the set, no more than 6 different ones; shadows from the theme, no more than 6; the shape check.
    • SCL-R04: a line of text is 45–75 characters; the judge judges/measure.md, helped by the measure sensor.

The checks read CSS, Tailwind classes (arbitrary values such as p-[13px]) and style={{…}} in TSX/JSX. They stand on the library of the design-base package; where they look for files is on its page Which files the design checks look at.

Where the boundary is

  • Values that go through var(), calc() or clamp() are not checked: the scale of the variables themselves checks them.
  • Color is not here: contrast is held by design-a11y, colors only from the theme by shadcn.
  • The package does not set the grid, breakpoints or line height.