SwiftSVG icon indicating copy to clipboard operation
SwiftSVG copied to clipboard

Support style element

Open jncn opened this issue 4 years ago • 0 comments

Description of the Issue Browsers support the SVG style element, see: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/style. Unfortunately SwiftSVG throws an error when trying to parse such files:

style is unsupported. For a complete list of supported elements, see the `allSupportedElements` variable in the `SVGParserSupportedElements` struct. Click through on the `elementName` variable name to see the SVG tag name.

Sample SVG

<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
  <style>
    circle {
      fill: gold;
      stroke: maroon;
      stroke-width: 2px;
    }
  </style>

  <circle cx="5" cy="5" r="4" />
</svg>

jncn avatar Jul 26 '21 23:07 jncn