• Padding / margin shorthand. Accepts numbers in design pixels and returns a Padding suitable for node.margin (or any other Padding field).

    • pad(16) — all four sides 16px.
    • pad(10, 16) — CSS-style shorthand: vertical 10px, horizontal 16px.
    • pad({ left: 40 }) — per-side; only the specified sides are emitted.

    Parameters

    • all: number

    Returns Padding

  • Parameters

    • vertical: number
    • horizontal: number

    Returns Padding

  • Parameters

    Returns Padding