An attempt to list all changes between SVG 1.1 and SVG 2.
Somewhat similar to Changes from SVG 1.1 from the SVG 2 spec, but actually lists all changes and not just changes to the spec itself. For example, that page doesn't list filter related changes and most of the text related changes are either omitted or scattered around the spec.
This document contains changes only to the static SVG subset. No animations, events and scripting.
A checkbox indicates that the related feature is implemented in resvg
.
NOTE: This list is not final. This just things I was able to find so far. Patches are welcome.
- A
turn
unit to<angle>
. - Following units:
ch
,rem
,vw
,vh
,vmin
,vmax
andQ
to<length>
. -
rgba()
,hsl()
andhsla()
notations to<color>
. - A
transparent
keyword to<color>
. - A
#RRGGBBAA
and#RGBA
notation for colors. Part of CSS Color 4. - A
opacity
property allows<percentage>
now.
-
<length>
no longer includes the%
unit. This variant was moved into a separate type:<length-percentage>
. -
<FuncIRI>
was replaced with an<url>
. The main change here is that<url>
allows quoted strings.
<color>
includes an alpha value now, which should be accounted byfill
,stroke
,flood-color
andstop-color
properties. But not bylighting-color
property. At least Chrome 92 and Firefox 91 doesn't do this.
-
refX
andrefY
properties to thesymbol
element. - An
auto
variant toimage
element'swidth
andheight
properties. - A
lang
attribute. The same asxml:lang
, but without the namespace.
-
width
andheight
properties of thesvg
element are set toauto
by default.
- A
baseProfile
attribute from thesvg
element. - A
version
attribute from thesvg
element. - A
externalResourcesRequired
attribute. - A
requiredFeatures
attribute. - A
xml:base
attribute.
- A
clip
property.
- A
transform-box
property. - A
transform-origin
property. - A
vector-effect
property.
-
transform
,patternTransform
andgradientTransform
are presentation attributes now. Which means that they can be resolved from CSS now.
- A
defer
keyword from thepreserveAspectRatio
attribute.
- CSS
transform
and SVGtransform
have different syntax.
- A
pathLength
attribute to all basic shapes.
Basically everything from CSS Text Module Level 3.
- WOFF font support is required now.
- A
path
property totextPath
. - A
side
property totextPath
. - A
font-feature-settings
property. - A
font-kerning
property. - A
font-synthesis
property. - A
font-variant-caps
property. - A
font-variant-east-asian
property. - A
font-variant-ligatures
property. - A
font-variant-numeric
property. - A
font-variant-position
property. - A
line-height
property. - A
text-align-last
property. - A
text-align
property. - A
text-indent
property. - A
text-orientation
property. - A
text-overflow
property. - A
text-transform
property. - A
unicode-range
property. - A
white-space
property. - A
text-decoration-line
property. - A
text-decoration-style
property. - A
text-decoration-color
property. - A
text-underline-position
property. - A
text-decoration-fill
property. - A
text-decoration-stroke
property. - A
inline-size
property. - A
shape-inside
property. - A
shape-subtract
property. - A
shape-image-threshold
property. - A
shape-margin
property. - A
shape-padding
property. - New variants to
font-variant
property. Previously it allowed onlysmall-caps
. - A
font-variant-css21
value tofont
property.
-
textPath
can reference basic shapes now. - Since CSS Fonts Module Level 4, the
font-weight
property allows any value in a 1..1000 range. - A
writing-mode
property introduces thehorizontal-tb
andvertical-lr
values from CSS Writing Modes Level 3. -
dominant-baseline
is inherited now. -
baseline-shift
is0
by default, instead ofbaseline
. - Percentage values in a
word-spacing
relate to a percentage of the affected character's width and not to viewport size now. -
filter
,clip-path
,mask
andopacity
properties can be set ontspan
andtextPath
elements. - A
text-decoration
property has a new, but backward compatible syntax.
- A
tref
element. - A
kerning
property. Usefont-kerning
instead. - A
glyph-orientation-horizontal
property. - A
altGlyph
element. - A
altGlyphDef
element. - A
altGlyphItem
element. - A
glyphRef
element. reset-size
,use-script
andno-change
variants fromdominant-baseline
.auto
,before-edge
, andafter-edge
variants fromalignment-baseline
.baseline
variant frombaseline-shift
.- Percentage values from
letter-spacing
.
- A
xml:space
property. - A
glyph-orientation-vertical
property. - A
baseline-shift
property. Usevertical-align
instead.
- As of 2021, only Inkscape has Text layout – Content Area support, but still a very minimal one.
text-transform
is technically a CSS 2.1 property, but was not allowed in SVG 1.1
- An
arcs
variant to thestroke-linejoin
property. - A
miter-clip
variant to thestroke-linejoin
property. - (partial support) A
paint-order
property. -
context-fill
andcontext-stroke
variants to the<paint>
type. - A
mix-blend-mode
property. - An
isolation
property. -
left
,center
andright
variants torefX
andrefY
properties of themarker
element. - An
auto-start-reverse
variant toorient
property of themarker
element - The
image-rendering
can appear as a presentation attribute with additional possible values. Currently, there is only best-effort support for "pixelated".
- Markers can be set on all shapes and not only on
path
.
- As of 2021, no one supports
stroke-linejoin:arcs
.
- A
fr
attribute to theradialGradient
element
-
<basic-shape>
and<geometry-box>
variants to theclip-path
property. - A
mask-image
property. - A
mask-mode
property. - A
mask-position
property. - A
mask-clip
property. - A
mask-origin
property. - A
mask-size
property. - A
mask-composite
property. - A
mask-type
property. - A
mask-border-source
property. - A
mask-border-mode
property. - A
mask-border-slice
property. - A
mask-border-width
property. - A
mask-border-outset
property. - A
mask-border-repeat
property. - A
mask-border
property.
- A
mask
property has a new grammar, backward compatible with SVG 1.1 one. - An element can have multiple masks now.
- A
feDropShadow
element. - An
edgeMode
attribute tofeGaussianBlur
element. - Filter functions.
- New blend modes to
feBlend
element. - A
no-composite
property tofeBlend
element.
- A
filter
property type changed from<FuncIRI>
to<filter-value-list>
. - The
saturate
type infeColorMatrix
can be larger than 1 now.
- An
enable-background
property.
- Filter functions doesn't have a filter region. Which means
blur()
anddrop-shadow()
cannot be losslessly converted tofilter
element. We have to manually calculate a new region (somehow). - Filter functions are always in sRGB color space, unlike a
filter
element, which is in linearRGB by default.
xlink:href
in favor ofhref
.
- A
font
element. - A
glyph
element. - A
missing-glyph
element. - A
hkern
element. - A
vkern
element. - A
font-face
element. - A
font-face-src
element. - A
font-face-uri
element. - A
font-face-format
element. - A
font-face-name
element.