Expose the path-length CSS property for SVG path elements, promoting the existing pathLength presentation attribute to a CSS‑expressible path property as defined in SVG 2.
CSS values follow normal cascade and override the presentation attribute. No new web APIs or security surface are introduced; existing pathLength behavior is preserved.
Example
<svg width="200" height="60">
<path id="p" d="M10 30 L190 30" pathLength="100" />
</svg>
<style>
/* CSS overrides the presentation attribute */
#p {
path-length: 200;
stroke: black;
stroke-dasharray: 50 150;
}
</style>
In this example, the path-length CSS property overrides the pathLength="100" attribute and participates in normal CSS cascading and animation.
Expose the
path-lengthCSS property for SVGpathelements, promoting the existingpathLengthpresentation attribute to a CSS‑expressiblepathproperty as defined in SVG 2.CSS values follow normal cascade and override the presentation attribute. No new web APIs or security surface are introduced; existing
pathLengthbehavior is preserved.Example
In this example, the
path-lengthCSS property overrides the pathLength="100" attribute and participates in normal CSS cascading and animation.