Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SVGs within HTML #16

Open
mykolaharmash opened this issue Aug 8, 2019 · 0 comments
Open

Support SVGs within HTML #16

mykolaharmash opened this issue Aug 8, 2019 · 0 comments
Labels

Comments

@mykolaharmash
Copy link
Owner

The main issue with parsing SVG is that tags inside, like path can be at the same time self-closing and have children. It's not the case with HTML where the list of self-closing tags is known upfront. Need to think of how to fit this tags duality.

SVG 2 Specs

Example of tags-duality from animationMotion tag spec. The last path has children.

<svg width="5cm" height="3cm"  viewBox="0 0 500 300"
     xmlns="http://www.w3.org/2000/svg">
  <desc>Example animMotion01 - demonstrate motion animation computations</desc>
  <rect x="1" y="1" width="498" height="298"
        fill="none" stroke="blue" stroke-width="2" />
  <path id="path1" d="M100,250 C 100,50 400,50 400,250"
        fill="none" stroke="blue" stroke-width="7.06"  />
  <circle cx="100" cy="250" r="17.64" fill="blue"  />
  <path d="M-25,-12.5 L25,-12.5 L 0,-87.5 z"
        fill="yellow" stroke="red" stroke-width="7.06"  >
    <animateMotion dur="6s" repeatCount="indefinite" rotate="auto" >
       <mpath href="#path1"/>
    </animateMotion>
  </path>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant