Skip to content

Stroke Style

A type of stroke as defined in 9.2.

json
{
  "focus-ring-style": {
    "$type": "strokeStyle",
    "$value": "dashed"
  },
  "alert-border-style": {
    "$type": "strokeStyle",
    "$value": {
      "dashArray": ["0.5rem", "0.25rem"],
      "lineCap": "round"
    }
  }
}
yaml
focus-ring-style:
  $type: strokeStyle
  $value: dashed
alert-border-style:
  $type: strokeStyle
  $value:
    dashArray:
      - 0.5rem
      - 0.25rem
    lineCap: round
PropertyTypeDescription
$typestringRequired. "strokeStyle"
$valuestring | objectSee Value types
$descriptionstring(Optional) A description of this token and its intended usage.

Value types

A Stroke Style token’s $value must be either of 2 possible types: string or object

String

A string value as defined in 9.2.1 must be one of the following keywords that correspond to the equivalent CSS line styles:

  • solid
  • dashed
  • dotted
  • double
  • groove
  • ridge
  • outset
  • inset

Object

An object value as defined in 9.2.2 is an object that must have the following 2 properties:

PropertyTypeDescription
dashArraystring[]An array of dimension values that specify alternating dashes & gaps.
lineCapstringMust be one of round, butt, or square.

Notes

See also