CSS stroke Property Reference
The CSS stroke property is a standard property in Scalable Vector Graphics. Review its formal syntax, computed behavior, and practical declarations.
Updated 2026-08-12
stroke overview
The CSS stroke property is a standard property in Scalable Vector Graphics. Review its formal syntax, computed behavior, and practical declarations.
The computed value normally inherits from the parent element when no declaration wins the cascade.
Syntax and formal definition
| Field | Value |
|---|---|
| Formal syntax | <paint> |
| Initial value | stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width |
| Applies to | asLonghands |
| Inherited | Yes |
| Percentages | no |
| Computed value | asLonghands |
| Animation type | stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width |
| Media | visual |
| Specification group | Scalable Vector Graphics |
| Status | Standard |
Practical examples
These declarations demonstrate valid ways to set stroke. The initial and inherit global keywords remain available even when a property-specific value is preferable.
CSS
.reset-example {
stroke: initial;
}
.inherit-example {
stroke: inherit;
}
@supports (stroke: initial) {
.supported {
stroke: initial;
}
}