Skip to content

strokeDashPattern

The dash and gap lengths that make a stroke dashed rather than solid.

Path

…elements.<element>.styles.strokeDashPattern

Elements Supported

component · container · ellipse · line · polygon · rectangle · slot · star · vector

Value

StrokeDashPattern

Dash geometry for a dashed stroke. dash and gap are in pixels and correspond to index 0 and 1 of Figma’s strokeDashes array.

dash: 8
gap: 4

null (default)

Platform bindings

Figma

Disposition: bound · Realised by: node.dashPattern

The schema’s { dash, gap } becomes Figma’s two-element dash array, which is exactly what the property takes. The schema permits no longer pattern — both members are required and no others are allowed — so nothing is truncated.

CSS

Disposition: unsupported · Realised by: —

Not emitted. CSS offers no control over border dash geometry — border-style: dashed exists but its dash and gap lengths are chosen by the user agent — so the schema’s explicit { dash, gap } in pixels cannot be honoured. A dashed stroke currently renders solid, because the border style the transform emits is always solid.

Figma key

Reads from strokeDashes. See ADR 059 — Border Style.

Decisions

  • ADR-059 — Stroke Dash Pattern
  • ADR-113 — Style defaults belong to the schema

Rules

RuleStatement
DSPEC-44Every property of Styles declares a default, and its value validates against that property’s own schema
DSPEC-45A declared default is a literal, never a TokenReference, PropBinding or Conditional

Source

FormatFile
JSON Schemapackages/schema/schema/styles.schema.json
TypeScriptpackages/schema/types/Styles.ts
Specification§4.1a, §11