Skip to content

Attributes support

Lukas Radermacher edited this page Jul 20, 2022 · 40 revisions

This document provides an overview of all SVG elements (as listed at https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute) and whether they are supported by this project. If the section for an attribute is empty, it is currently unknown whether the element is supported.

Explanation

  • If an attribute is supported on all elements it may be used on, the section will just say ":heavy_check_mark: Full support".
  • If an attribute is not supported on any element, the section will just say ":x: Not supported".
  • Some attributes might not be supported on all possible elements or they only accept a subset of all possible values. In this case, you will see a table like

spreadMethod

pad All other values
<linearGradient> ✔️ Supported ❌ Not supported
All other elements ❌ Not supported ❌ Not supported

Please note: This table only is an example for support tables. To find out the actual support for the spreadMethod-attribute, please take a look at its section.

accent-height

⚠️ This attribute is deprecated. It won't be supported.

accumulate

❌ Not supportedhttps://github.com/hpi-swa-teaching/SVGMorph.wiki.git

additive

❌ Not supported

alignment-baseline

❌ Not supported

alphabetic

⚠️ This attribute is deprecated. It won't be supported.

amplitude

❌ Not supported

arabic-form

⚠️ This attribute is deprecated. It won't be supported.

ascent

⚠️ This attribute is deprecated. It won't be supported.

attributeName

❌ Not supported

attributeType

⚠️ This attribute is deprecated. It won't be supported.

azimuth

❌ Not supported

baseFrequency

❌ Not supported

baseline-shift

❌ Not supported

baseProfile

⚠️ This attribute is deprecated. It won't be supported.

bbox

⚠️ This attribute is deprecated. It won't be supported.

begin

❌ Not supported

bias

❌ Not supported

by

❌ Not supported

calcMode

❌ Not supported

cap-height

⚠️ This attribute is deprecated. It won't be supported.

class

❌ Not supported

clip

⚠️ This attribute is deprecated. It won't be supported.

clipPathUnits

❌ Not supported

clip-path

❌ Not supported

clip-rule

❌ Not supported

color

❌ Not supported

color-interpolation

❌ Not supported

color-interpolation-filters

❌ Not supported

color-profile

⚠️ This attribute is deprecated. It won't be supported.

color-rendering

❌ Not supported

contentScriptType

⚠️ This attribute is deprecated. It won't be supported.

contentStyleType

⚠️ This attribute is deprecated. It won't be supported.

crossorigin

❌ Not supported

cursor

❌ Not supported

cx

length percentage
<circle> Partial support (see 1.) ❌ Not supported
<ellipse> Partial support (see 1.) ❌ Not supported
<radialGradient> ❌ Not supported ✔️ Full support
  1. Not all length units are supported

cy

See cx.

d

M m L l H h V v C c S s Q q T t A a Z z
<path> Supported Supported Not Supported (see 2.) Not Supported (see 2.) Not Supported (see 2.) Not Supported (see 2.) Not Supported (see 2.) Not Supported (see 2.) Partial support (see 1.) Partial support(see 1.) Partial support (see 1.) Partial support (see 1.) Not Supported (see 2.) Not Supported (see 2.) Not Supported (see 2.) Not Supported (see 2.) Partial support (see 3.) Partial support (see 3.) Not supported Not supported

Known bugs

  1. All segments are translated to morph objects, but just the first of them is rendered.
  2. Renderer expects segments to have 4 control points (see Bezier based rendering), but lines just have 2 control points.
  3. Large arcs are split into multiple bezier curves (e.g. 4) but just the first is rendered. Might relate to (1.)

decelerate

❌ Not supported

descent

⚠️ This attribute is deprecated. It won't be supported.

diffuseConstant

❌ Not supported

direction

❌ Not supported

display

none inherit inline All other values
<g>, <svg> Partial support (see 1.) Partial support (see 2.) ✔️ Full support Partial support (see 2.)
All other elements ❌ Not supported Partial support (see 2.) ✔️ Full support Partial support (see 2.)
  1. Elements with display set to none should not be part of the rendering tree and should therefore not be taken into account when computing bounds. This is currently not implemented. Nevertheless, there is currently no feature that relies on the bounds of <g>s or <svg>s.
  2. At the moment, inherit is treated like any value but none, so the element will be displayed. However, children of elements with display set to none should never be displayed, so the wrong interpretation does not cause any visible issues. On export, inherit will be exported correctly.
  3. Will be displayed like inline which should be fine in most cases. No special features like grids are supported.

divisor

❌ Not supported

dominant-baseline

❌ Not supported

dur

❌ Not supported

dx

❌ Not supported

dy

❌ Not supported

edgeMode

❌ Not supported

elevation

❌ Not supported

enable-background

⚠️ This attribute is deprecated. It won't be supported.

end

❌ Not supported

exponent

❌ Not supported

fill

freeze, remove currentcolor none Reference to gradient Reference to pattern context-fill, context-stroke Color keywords (e.g. lime) Three digit hex (e.g. #0f0) Six digit hex (e.g. #0f0) RGB (e.g. rgb(0, 255, 0)) RGB percentages (e.g. rgb(0%, 100%, 0%)) RGBA (e.g. rgb(0, 255, 0, 0.5)) RGBA percentages (e.g. rgb(0%, 100%, 0%, 0.5)) transparent HSL and HSLA
<circle>, <ellipse> Not allowed on this elements ❌ Not supported (see 1.) Partial support (see 3.) Partial support (see 4.) ❌ Not supported (see 5.) ❌ Not supported Partial support (see 6.) Not supported ✔️ Full support ✔️ Full support ✔️ Full support Partial support (see 7.) Partial support (see 7.) ✔️ Full support ❌ Not supported
<path>, <polygon>, <polyline>, <rect>, <text>, <tspan> Not allowed on this elements ❌ Not supported (see 1.) Partial support (see 3.) ✔️ Full support ❌ Not supported (see 5.) ❌ Not supported Partial support (see 6.) Not supported ✔️ Full support ✔️ Full support ✔️ Full support Partial support (see 7.) Partial support (see 7.) ✔️ Full support ❌ Not supported
<animate>, <animateColor>, <animateMotion>, <animateTransform>, <set> ❌ Not supported (see 2.) ❌ Not supported (see 1., 2.) ❌ Not supported (see 2.) ❌ Not supported (see 2.) ❌ Not supported (see 2., 5.) ❌ Not supported (see 2.) ❌ Not supported (see 2.) ❌ Not supported (see 2.) ❌ Not supported (see 2.) ❌ Not supported (see 2.) ❌ Not supported (see 2.) ❌ Not supported (see 2.) ❌ Not supported (see 2.) ❌ Not supported (see 2.) ❌ Not supported (see 2.)
  1. As the color attribute is not supported yet, currentcolor cannot be used
  2. At the moment, there is no support for animations. Therefore, the respective elements and attribute values cannot be used.
  3. A fill of none will be displayed correctly, but in the export, it will show up as transparent fill (#00000000) which might cause some issues.
  4. The gradient will only be rendered correctly if the <circle> or <element> has its upper left corner at (0, 0) in the morphic world.
  5. Since <pattern>s are not supported yet, they cannot be referenced.
  6. Color keywords will only be recognized in lowercase, while the color names should be case-insensitive according to the specification.
  7. The aplha value will be ignored. This violates the specification, which states that a user agent must ignore unknown properties and must never support certain values partially.

fill-opacity

✔️ Full support

fill-rule

filter

❌ Not supported

filterRes

⚠️ This attribute is deprecated. It won't be supported.

filterUnits

❌ Not supported

flood-color

❌ Not supported

flood-opacity

❌ Not supported

font-family

font-size

font-size-adjust

❌ Not supported

font-stretch

❌ Not supported

font-style

❌ Not supported

font-variant

❌ Not supported

font-weight

❌ Not supported

format

⚠️ This attribute is deprecated. It won't be supported.

from

❌ Not supported

fr

❌ Not supported

fx

❌ Not supported

fy

❌ Not supported

g1

⚠️ This attribute is deprecated. It won't be supported.

g2

⚠️ This attribute is deprecated. It won't be supported.

glyph-name

⚠️ This attribute is deprecated. It won't be supported.

glyph-orientation-horizontal

⚠️ This attribute is deprecated. It won't be supported.

glyph-orientation-vertical

⚠️ This attribute is deprecated. It won't be supported.

glyphRef

⚠️ This attribute is deprecated. It won't be supported.

gradientTransform

gradientUnits

hanging

⚠️ This attribute is deprecated. It won't be supported.

height

href

❌ Not supported

hreflang

❌ Not supported

horiz-adv-x

⚠️ This attribute is deprecated. It won't be supported.

horiz-origin-x

⚠️ This attribute is deprecated. It won't be supported.

id

✔️ Full support

Please note

  • The validity of IDs is not validated. Therefore, invalid IDs may be exported if the original document contained invalid IDs. Invalid IDs include the same ID for multiple elements or IDs with invalid characters.
  • Although IDs can be specified and will be parsed for every element, they might not be usable for every purpose, like referencing clip paths. Please refer to the documentation of the attribute you want to supply with IDs of other elements.

ideographic

⚠️ This attribute is deprecated. It won't be supported.

image-rendering

❌ Not supported

in

❌ Not supported

in2

❌ Not supported

intercept

❌ Not supported

k

⚠️ This attribute is deprecated. It won't be supported.

k1

❌ Not supported

k2

❌ Not supported

k3

❌ Not supported

k4

❌ Not supported

kernelMatrix

❌ Not supported

kernelUnitLength

⚠️ This attribute is deprecated. It won't be supported.

kerning

⚠️ This attribute is deprecated. It won't be supported.

keyPoints

❌ Not supported

keySplines

❌ Not supported

keyTimes

❌ Not supported

lang

❌ Not supported

lengthAdjust

❌ Not supported

letter-spacing

❌ Not supported

lighting-color

❌ Not supported

limitingConeAngle

❌ Not supported

local

marker-end

❌ Not supported

marker-mid

❌ Not supported

marker-start

❌ Not supported

markerHeight

❌ Not supported

markerUnits

❌ Not supported

markerWidth

❌ Not supported

mask

❌ Not supported

maskContentUnits

❌ Not supported

maskUnits

❌ Not supported

mathematical

⚠️ This attribute is deprecated. It won't be supported.

max

❌ Not supported

media

❌ Not supported

method

❌ Not supported

min

❌ Not supported

mode

name

⚠️ This attribute is deprecated. It won't be supported.

numOctaves

❌ Not supported

offset

opacity

Partial support.

For strokes, this property is only taken into account if the stroke property is set for the same element. The opacity won't overridde inherited strokes.

operator

❌ Not supported

order

❌ Not supported

orient

❌ Not supported

orientation

⚠️ This attribute is deprecated. It won't be supported.

origin

❌ Not supported

overflow

❌ Not supported

overline-position

❌ Not supported

overline-thickness

❌ Not supported

panose-1

⚠️ This attribute is deprecated. It won't be supported.

paint-order

❌ Not supported

path

❌ Not supported

pathLength

❌ Not supported

patternContentUnits

❌ Not supported

patternTransform

❌ Not supported

patternUnits

❌ Not supported

ping

❌ Not supported

pointer-events

❌ Not supported

points

pointsAtX

❌ Not supported

pointsAtY

❌ Not supported

pointsAtZ

❌ Not supported

preserveAlpha

❌ Not supported

preserveAspectRatio

❌ Not supported

primitiveUnits

❌ Not supported

r

length percentage
<circle> Partially supported (see 1.) ❌ Not supported
<radialGradient> ❔ Unknown ❔ Unknown
  1. Not all length units are supported

radius

referrerPolicy

❌ Not supported

refX

❌ Not supported

refY

❌ Not supported

rel

rendering-intent

❌ Not supported

repeatCount

❌ Not supported

repeatDur

❌ Not supported

requiredExtensions

❌ Not supported

requiredFeatures

⚠️ This attribute is deprecated. It won't be supported.

restart

❌ Not supported

result

❌ Not supported

rotate

❌ Not supported

rx

auto length percentage
<ellipse> ❌ Not supported Partial support (see 1.) ❌ Not supported
<rect> ❌ Not supported ❌ Not supported ❌ Not supported
  1. Not all length units are supported

ry

See rx.

scale

❌ Not supported

seed

❌ Not supported

shape-rendering

❌ Not supported

slope

⚠️ This attribute is deprecated. It won't be supported.

spacing

❌ Not supported

specularConstant

❌ Not supported

specularExponent

❌ Not supported

speed

❌ Not supported

spreadMethod

startOffset

❌ Not supported

stdDeviation

❌ Not supported

stemh

⚠️ This attribute is deprecated. It won't be supported.

stemv

⚠️ This attribute is deprecated. It won't be supported.

stitchTiles

❌ Not supported

stop-color

stop-opacity

strikethrough-position

❌ Not supported

strikethrough-thickness

❌ Not supported

string

⚠️ This attribute is deprecated. It won't be supported.

stroke

currentcolor none Reference to gradient Reference to pattern context-fill, context-stroke Color keywords (e.g. lime) Three digit hex (e.g. #0f0) Six digit hex (e.g. #0f0) RGB (e.g. rgb(0, 255, 0)) RGB percentages (e.g. rgb(0%, 100%, 0%)) RGBA (e.g. rgb(0, 255, 0, 0.5)) RGBA percentages (e.g. rgb(0%, 100%, 0%, 0.5)) transparent HSL and HSLA
<circle>, <ellipse> ❌ Not supported (see 1.) Partial support (see 2.) Partial support (see 3.) ❌ Not supported (see 4.) ❌ Not supported Partial support (see 5.) Not supported ✔️ Full support ✔️ Full support ✔️ Full support Partial support (see 6.) Partial support (see 6.) ✔️ Full support ❌ Not supported
<path>, <polygon>, <polyline>, <rect> ❌ Not supported (see 1.) Partial support (see 2.) ✔️ Full support ❌ Not supported (see 4.) ❌ Not supported Partial support (see 5.) Not supported ✔️ Full support ✔️ Full support ✔️ Full support Partial support (see 6.) Partial support (see 6.) ✔️ Full support ❌ Not supported
<text>, <tspan> ❌ Not supported (see 7.) ❌ Not supported (see 7.) ❌ Not supported (see 7.) ❌ Not supported (see 7.) ❌ Not supported (see 7.) ❌ Not supported (see 7.) ❌ Not supported (see 7.) ❌ Not supported (see 7.) ❌ Not supported (see 7.) ❌ Not supported (see 7.) ❌ Not supported (see 7.) ❌ Not supported (see 7.) ❌ Not supported (see 7.) ❌ Not supported (see 7.)
  1. As the color attribute is not supported yet, currentcolor cannot be used.
  2. A stroke of none will be displayed correctly, but in the export, it will show up as transparent stroke (#00000000) which might cause some issues.
  3. The gradient will only be rendered correctly if the <circle> or <element> has its upper left corner at (0, 0) in the morphic world.
  4. Since <pattern>s are not supported yet, they cannot be referenced.
  5. Color keywords will only be recognized in lowercase, while the color names should be case-insensitive according to the specification.
  6. The aplha value will be ignored. This violates the specification, which states that a user agent must ignore unknown properties and must never support certain values partially.
  7. Stroked characters (specified with <text> or <tspan>) are not supported.

stroke-dasharray

❌ Not supported

stroke-dashoffset

❌ Not supported

stroke-linecap

❌ Not supported

stroke-linejoin

❌ Not supported

stroke-miterlimit

❌ Not supported

stroke-opacity

Partial support.

This property is only taken into account if the stroke property is set for the same element. The opacity of inherited strokes won't be overridden.

stroke-width

style

❌ Not supported

surfaceScale

❌ Not supported

systemLanguage

❌ Not supported

tabindex

❌ Not supported

tableValues

❌ Not supported

target

❌ Not supported

targetX

❌ Not supported

targetY

❌ Not supported

text-anchor

text-decoration

❌ Not supported

text-rendering

❌ Not supported

textLength

❌ Not supported

to

❌ Not supported

transform

transform-origin

❌ Not supported

type

u1

⚠️ This attribute is deprecated. It won't be supported.

u2

⚠️ This attribute is deprecated. It won't be supported.

underline-position

❌ Not supported

underline-thickness

❌ Not supported

unicode

⚠️ This attribute is deprecated. It won't be supported.

unicode-bidi

❌ Not supported

unicode-range

⚠️ This attribute is deprecated. It won't be supported.

units-per-em

⚠️ This attribute is deprecated. It won't be supported.

v-alphabetic

⚠️ This attribute is deprecated. It won't be supported.

v-hanging

⚠️ This attribute is deprecated. It won't be supported.

v-ideographic

⚠️ This attribute is deprecated. It won't be supported.

v-mathematical

⚠️ This attribute is deprecated. It won't be supported.

values

❌ Not supported

vector-effect

❌ Not supported

version

⚠️ This attribute is deprecated. It won't be supported.

vert-adv-y

⚠️ This attribute is deprecated. It won't be supported.

vert-origin-x

⚠️ This attribute is deprecated. It won't be supported.

vert-origin-y

⚠️ This attribute is deprecated. It won't be supported.

viewBox

⚠️ This attribute is deprecated. It won't be supported.

viewTarget

❌ Not supported

visibility

✔️ Full support

Please note: Elements with visibility set to collapsed or hidden should still be taken into account when calculating positions. This does not work for <tspan> elements and is a known bug. However, it also does not work if the visibility is set to visible, so this bug is not related to this attribute.

width

widths

⚠️ This attribute is deprecated. It won't be supported.

word-spacing

❌ Not supported

writing-mode

❌ Not supported

x

length percentage
<rect> ❌ Partially supported (see 1.) ❌ Not supported
<text> ❌ Partially supported (see 1.) ❌ Not supported
<tspan> ❌ Partially supported (see 1.) ❌ Not supported
All other elements ❌ Not supported ❌ Not supported
  1. Not all length units are supported

x-height

⚠️ This attribute is deprecated. It won't be supported.

x1

x2

xChannelSelector

❌ Not supported

xlink:actuate

❌ Not supported

xlink:arcrole

⚠️ This attribute is deprecated. It won't be supported.

xlink:href

⚠️ This attribute is deprecated. It won't be supported.

xlink:role

⚠️ This attribute is deprecated. It won't be supported.

xlink:show

⚠️ This attribute is deprecated. It won't be supported.

xlink:title

⚠️ This attribute is deprecated. It won't be supported.

xlink:type

⚠️ This attribute is deprecated. It won't be supported.

xml:base

⚠️ This attribute is deprecated. It won't be supported.

xml:lang

❌ Not supported

xml:space

⚠️ This attribute is deprecated. It won't be supported.

y

See x.

y1

y2

yChannelSelector

❌ Not supported

z

❌ Not supported

zoomAndPan

⚠️ This attribute is deprecated. It won't be supported.

Clone this wiki locally