Skip to main content

Harshal V. LADHE

Normalising SVG Shapes with pathLength

Using the `pathLength` attribute to give any SVG shape a fixed length, so `stroke-dasharray` and `stroke-dashoffset` values become simple percentages.

Content tagged pathLength

  • Snippet:CSS & SVG Loading Spinner from One Circle

    Build an SVG loading spinner from one circle.
    Build an accessible SVG loading spinner from one circle: pathLength and stroke-dasharray draw the arc, CSS spins it, with reduced-motion support.
    Published at:
    Categories:SVG
    Estimated reading time:5 min read