Brandparser
Schemas

Spacing

Spacing scale (base unit plus named steps) extracted from computed CSS values, used to populate the Spacing section of a brand DESIGN.md file.

Properties

base_unit_pxintegerrequired

Base unit in pixels. Most design systems use 4 or 8.

Example: 4

scaleobject[]required

Ordered spacing scale. Includes "none" (0) plus at least 3 positive steps.

name"none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl"required
value_pxintegerrequired
rolestringrequired
confidence"high" | "medium" | "low"required
rationalestringrequired

Short explanation of how the base unit and scale were chosen.

Example
example.json
{
  "base_unit_px": 4,
  "scale": [
    {
      "name": "none",
      "value_px": 0,
      "role": "string"
    }
  ],
  "confidence": "high",
  "rationale": "string"
}