Skip to content

SVG path animation: unclear behavior for from + by when commands mismatch #1056

@viralipurbey

Description

@viralipurbey

There is an interoperability gap in the SVG spec for animate on path (attributeName="d") when using from + by and the path commands are incompatible.

<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">
   <path id="animated" d="" fill="green">
    <animate attributeName="d"
             from="M10,10 L50,10 L50,50 Z"
             by="M20,20 C40,20 40,40 60,40 Z"
             begin="0s"
             dur="2s"
             fill="freeze" />
  </path>
</svg>

Observed behavior (Gecko)
The path is not rendered during the animation.

Spec ambiguity
The spec says incompatible values fall back to discrete animation, but it does not define:

  • what value should be rendered (from, base value, or none), or
  • whether rendering nothing is conforming behavior.

For path animations, incompatible command structures cannot be meaningfully added or interpolated, making discrete fallback unclear for from/by and additive animations.

Request
Clarify in the SVG spec the expected behavior for path animations with incompatible commands:

  • Is rendering nothing valid?
  • Should discrete fallback use a specific value?
  • How should from/by additive animations be handled?

This clarification would improve interoperability and reflect real engine constraints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions