CSS stroke-opacity Property Reference
The CSS stroke-opacity property is a standard property in Scalable Vector Graphics. Review its formal syntax, computed behavior, and practical declarations.
Updated 2026-08-12
stroke-opacity overview
The CSS stroke-opacity 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 | <'opacity'> |
| Initial value | 1 |
| Applies to | limitedSVGElementsShapes |
| Inherited | Yes |
| Percentages | no |
| Computed value | specifiedValueClipped0To1 |
| Animation type | byComputedValueType |
| Media | visual |
| Specification group | Scalable Vector Graphics |
| Status | Standard |
Practical examples
These declarations demonstrate valid ways to set stroke-opacity. The initial and inherit global keywords remain available even when a property-specific value is preferable.
.reset-example {
stroke-opacity: initial;
}
.inherit-example {
stroke-opacity: inherit;
}
@supports (stroke-opacity: initial) {
.supported {
stroke-opacity: initial;
}
}