Skip to content

Elements support

Lukas Radermacher edited this page Aug 3, 2022 · 18 revisions

This document provides an overview of all SVG elements (as listed at https://developer.mozilla.org/en-US/docs/Web/SVG/Element) and wheter they are supported by this project. Empty sections represent that it is currently unknown whether the element is supported or not.

Please note: According to the specification, a user agent should treat all unknown elements as <g>. This is not implemented in this project yet.

<a>

❌ Not supported

<altGlyph>

⚠️ Deprecated – Won't be supported

<altGlyphDef>

⚠️ Deprecated – Won't be supported

<altGlyphItem>

⚠️ Deprecated – Won't be supported

<animate>

❌ Not supported

<animateColor>

⚠️ Deprecated – Won't be supported

<animateMotion>

❌ Not supported

<animateTransform>

❌ Not supported

<circle>

Partial support

Known Bugs

See <ellipse>

<clipPath>

❌ Not supported

<cursor>

⚠️ Deprecated – Won't be supported

<defs>

Supported.

Often used in combination with <use>.

Referecing of elements (in <defs>) works via their id.

<desc>

❌ Not supported

<discard>

❌ Not supported

<ellipse>

Partial support

Known Bugs

These defects are related to the bezier-based rendereing approach. We chose this approach to fix !12. The build-in stroke methods use square stencils, resulting in incorrect renderings for significant border-widths.

<feBlend>

❌ Not supported

<feColorMatrix>

❌ Not supported

<feComponentTransfer>

❌ Not supported

<feComposite>

❌ Not supported

<feConvolvematrix>

❌ Not supported

<feDiffuseLighting>

❌ Not supported

<feDisplacementMap>

❌ Not supported

<feDistantLight>

❌ Not supported

<feDropShadow>

❌ Not supported

<feFlood>

❌ Not supported

<feFuncA>

❌ Not supported

<feFuncB>

❌ Not supported

<feFuncG>

❌ Not supported

<feFuncR>

❌ Not supported

<feGaussianBlur>

❌ Not supported

<feImage>

❌ Not supported

<feMerge>

❌ Not supported

<feMergeNode>

❌ Not supported

<feMorphology>

❌ Not supported

<feOffset>

❌ Not supported

<fePointLight>

❌ Not supported

<feSpecularLighting>

❌ Not supported

<feSpotLight>

❌ Not supported

<feTile>

❌ Not supported

<feTurbulence>

❌ Not supported

<filter>

❌ Not supported

<font>

⚠️ Deprecated – Won't be supported

<font-face>

⚠️ Deprecated – Won't be supported

<font-face-format>

⚠️ Deprecated – Won't be supported

<font-face-name>

⚠️ Deprecated – Won't be supported

<font-face-src>

⚠️ Deprecated – Won't be supported

<font-face-uri>

⚠️ Deprecated – Won't be supported

<foreignObject>

❌ Not supported

<g>

Partial supported

Known Bugs

  • While scaling/ transforming the morph graphic artifacts occour.

<glyph>

⚠️ Deprecated – Won't be supported

<glyphRef>

⚠️ Deprecated – Won't be supported

<hatch>

❌ Not supported

Not included in SVG 2 and browsers.

<hatchpath>

❌ Not supported

Not included in SVG 2 and browsers.

<hkern>

⚠️ Deprecated – Won't be supported

<image>

Not supported

<line>

Partial support

Known bugs

  • when not parallel to x/y axis: line ending is a peak (>) - should be truncated (|)

<linearGradient>

Partial support

Known bugs

  • not drawn properly
  • does not differentiate different settings for gradientUnits
  • behaves "weirdly" when canvas is transformed. Changes, but not as expected.

<marker>

❌ Not supported

<mask>

❌ Not supported

<metadata>

❌ Not supported

<missing-glyph>

⚠️ Deprecated – Won't be supported

<mpath>

❌ Not supported

<path>

Partial support

Known bugs

  • mainly depend on what is supported by <d> attribute

<pattern>

❌ Not supported

<polygon>

Partial support

Known bugs

  1. Big <stroke> adds additional corners to e.g. haxagons. Might be related to <line> and <polyline> issues.

<polyline>

Partial support

Known bugs

  • default attributes not yet implemented.
  • line ending is a peak (>) - should be truncated (|) (see <line>)

<radialGradient>

Partial support

Known bugs

  1. When rendering circles or ellipses using our new bezier-based rendering methods, the position of gradients is currently not set correctly

<rect>

Supported

<script>

❌ Not supported

<set>

❌ Not supported

<stop>

❌ Not supported

<style>

❌ Not supported

<svg>

Partial support

  1. Only top level <svg> tags are supported
  2. The first two values of the viewBox specify the location of the SVGMorph when created, the last two values the width and height (which are ignored if width and height are set)

<switch>

❌ Not supported

<symbol>

❌ Not supported

<text>

Supported

<textPath>

❌ Not supported

<title>

❌ Not supported

<tref>

⚠️ Deprecated – Won't be supported

<tspan>

Partial support

Known Bugs

  • <tspan>s without a position specified, will always be placed at the position of the surrounding <text> element rather than at the correct position in the text flow.

<use>

❌ Not supported.

<view>

❌ Not supported

<vkern>

⚠️ Deprecated – Won't be supported