Skip to content

strokeRendering

disposition: bound, basis: implementation

A rule of the CSS binding. These keys resolve jointly — no one of them determines any single output, so the rule below is the mapping.

Keys. strokes, strokeAlign, strokeWeight

Operands

Every fact the rule reads. Nothing outside this set participates.

OperandFrom
self.strokesdocument
self.strokeWeightdocument
self.strokeAligndocument
context.isDefaultBlockemitter context

Derived predicates

NameExpressionSource
derived.asOutlinenot self.strokeWeight.form = perSideObject and self.strokeWeight.form ≠ tokenReferenceborder.ts:51-53 — a per-side object becomes border-, a scalar or token becomes outline-
derived.gradientStrokeself.strokes.form = gradientborder.ts:73-113

Cases

Ordered — first match wins.

#WhenEmitsWhy
1derived.gradientStroke = truenothinga gradient stroke is painted by a separate pseudo-element rule, not a border or outline
2self.strokes present and derived.asOutline = falseborder-color: <self.strokes>
border-style: solid
3self.strokes present and derived.asOutline = trueoutline-color: <self.strokes>
outline-style: solid
4self.strokeWeight present and derived.asOutline = falseborder-width: <per side>
5self.strokeWeight present and derived.asOutline = true and (self.strokeAlign = OUTSIDE or self.strokeAlign = CENTER)outline-width: <self.strokeWeight>
6self.strokeWeight present and derived.asOutline = trueoutline-width: <self.strokeWeight>
outline-offset: <negated self.strokeWeight>
7context.isDefaultBlock = true and self.strokeWeight absentborder-width: 0 or outline-width: 0, matching whichever style was emitteda default block must reset a width it did not state

Otherwise

Nothing is emitted.

css/style/border.ts:51-53, 73-167. strokeAlign contributes no declaration of its own — it only flips the outline-offset sign. strokeDashPattern is NOT consulted: see its own row.