A number of stylistic changes have been made to the specification to make it more readable. These include the following:
A change towards using styling similar to contemporary CSS specifications, removing mention of XSL-FO.
Annotations have been added to the specification to reflect features that the Working Group
has resolved on including and for which a member of the group has committed to drive that feature.
Changes to highlight that SVG can be used in HTML as well as in XML.
Removed chapters whose normative content has either been moved to other specifications or deprecated: Filters, Clipping and Masking, Animation, Fonts, Color.
Removed the (informative) Concepts and Backwards Compatibility chapters, as well as multiple appendices.
Merged and re-organized multiple chapters:
Made the (normative) Conformance appendix a chapter.
Moved sections on 'display' and 'visibility' properties from the Painting chapter to the Rendering Model chapter.
Moved remaining sections from Clipping, Masking, and Compositing chapter into the Rendering Model chapter.
Merged the SVG 1.1 Metadata chapter into the Document Structure chapter.
Moved the 'image' element definition from the Document Structure chapter to the new Embedded Content chapter.
Moved Foreign namespaces and private data section from the SVG 1.1 Extensibility chapter to Document Structure chapter.
Created the Geometry Properties chapter, and moved relevant definitions to it from the Basic Shapes and Paths chapters.
Created the Embedded Content chapter, and merged all content from the SVG 1 Extensibility chapter into it.
Merged the SVG 1.1 Scripting and Interactivity chapters.
Tidied up the changes list, adding missing changes,
and adding links to issue discussion for changes since the initial Candidate Recommendation.
Edits
Consistently use the term "user coordinate system" (previously, the
synonymous term "local coordinate system" was also used).
Issue discussionEdits
K.2. Substantial changes
In additional to the editorial changes listed above, the following substantial additions, changes and removals
have been made.
K.2.1. Across the whole document
References to the SVG DTD have been removed.
IDL has been updated to use Web IDL syntax.
Added "length" attribute and indexed property access to all list interfaces.
Remove definition of <angle> type and reference CSS3-values.
Change all coordinate types to <length> in preparation for referencing css3-values.
Add the ‘script’ element to the content model of all elements.
Changed the initialize, appendItem, replaceItem and insertItemBefore methods
on list objects to make a copy of any list item being inserted that is already
in another list.
The ‘image’ and ‘script’ elements have gained a crossorigin attribute,
for use with the CORS-enabled fetch algorithm.
K.2.3. Conformance Criteria chapter (Appendix in SVG 1.1)
Animations do not run in documents processed
as resource documents.
Made the appendix a chapter.
Integrate content on processing modes from the SVG Integration specification.
Define required processing modes for different types of SVG cross-references,
with suggested processing modes for similar references from HTML/CSS.
(Replaces the "referencing modes" section from SVG Integration.)
Update and re-organize all the conformance classes,
to be consistent with changes to other parts of this specification
and changes to other specifications.
Make clear that a SVG viewer for conformance purposes
is the user agent / SVG user agent mentioned everywhere else in the spec;
move the corresponding definitions from the Document structure chapter to here.
Move the non-normative section on suggested methods for generating
high-precision graphics to the Implementation Notes appendix.
Removed getStrokeBBox from SVGGraphicsElement and extended getBBox with a dictionary argument that controls which parts of the element are included in the returned bounding box.
Specify DOMPointInit as argument type for isPointInFill() and isPointInStroke() instead of DOMPoint, and
specify algorithm used for isPointInFill() and isPointInStroke().
Issue discussionEdits
Merged in content from the former normative SVG DOM appendix
(after edits),
with sections on reflecting attributes re-arranged to fit.
Issue discussionEdits
Clarify possible UA behavior on getTotalLength, getPointAtLength, getBBox, getCTM, getScreenCTM, isPointInFill
and isPointInStroke if the current element is a non-rendered element.
Removed the text-decoration-fill and text-decoration-stroke properties.
Setting the DOM property for an enumerated attribute
to an out-of-range integer or 0 throws a TypeError.
Issue discussion
Defined event handler content attributes and IDL attributes on the root ‘svg’ element to be for events fired at the Window, like HTML's event handler content attributes and IDL attribute on body.
Rewrite ‘desc’ and ‘title’ description
to reflect ARIA and accessibility mapping.
Remove recommendation on how to structure metadata elements
within the SVG document.
Remove requirement for SVGDocument property on the Document interface object.
Descendent elements of ‘switch’ that have
the ‘systemLanguage’ attribute should be reordered according to the
definition of the SMIL 'allowReorder' attribute.
Update section on element roles to conform to latest SVG Accessibility API Mappings specification.
Soften recommendation to put pre-defined content in a defs element even if not required.
Change display behavior of defs, title, desc, metadata, and symbol elements to be defined using user agent styles.
Allow x, y, width, and height presentation attributes on a symbol, with the same effect on a rendered instance as on a nested svg element.
Specify a backwards-compatible default behavior for ‘refX’ and ‘refY’ on a symbol (which will be different from marker); clarify that keywords have same behavior as marker.
Re-define use-element shadow trees to be consistent with the shadow DOM spec,
to integrate better with other SVG 2 changes,
and to clarify much related behavior, including:
x/y/width/height are presentation attributes, albeit ones with a unique effect on final layout
zero values for width and height are only significant through their impact on the used value of a cloned svg/symbol; negative values are parse errors
Allow use elements to reference any element that can be a valid child of an SVG container, rather than only graphics elements
Define the SVGUseElementShadowRoot interface as an extension of the ShadowRoot interface, and require it to be used for use-element shadow trees
Define a number of terms related to shadow DOM and use elements, referencing the DOM standard where applicable
Clarify that use-element shadow trees are generated even if the element is in a conditional processing failed branch (consistent with previous guidance re display:none)
Element instances in the shadow tree must appear to be regular Element nodes, except they are read-only.
Properties formerly defined on the SVGElementInstance object are now defined as a mixin interface extending SVGElement
Clarify that URL references in cloned content are made absolute relative to the source file.
Clarify that the shadow tree is discarded if the cross-references change, including due to declarative animation (the original and animated shadow trees are not preserved in parallel).
Clarify that circular references only block the rendering of the use-element that would connect the circle, and not it's own host.
Added warning about x/y behaving as a transformation on the use element, and the impact on userSpaceOnUse graphical effects.
Redefine the way width/height on use elements impact svg/symbol to be consistent with geometry properties and auto values.
Clarify that for other re-used graphics (not svg/symbol), the shadow elements are laid out in the use element's coordinate system, including for the resolution of percentage lengths.
Redefine style cloning in shadow trees to be consistent with style scoping in shadow DOM, including by requiring style sheets to be cloned into the shadow DOM's scope.
Add warning and example regarding the cases where this results in different styles than an SVG 1.1-conforming user agent.
Add example regarding the inherited behavior of the visibility property.
Require multimedia in use-element copies to be synchronized with all other instances of the same original element.
Clarify that the shadow tree shares the document timeline for animations with its host document.
Define a ShadowAnimation interface to represent the cloning of Web Animations API animations
Prohibit WAAPI animations from being directly applied to element instances in the use-element shadow tree.
Define the propagation of SMIL-style animations through the cloning of animation elements; require that animations elements affecting the referenced graphic be cloned into the shadow tree, even if they are not descendents of the referenced element.
Define how event-based animation element triggers and animation element href attributes behave when there are multiple elements with the same ‘id’ in different node trees.
Require event handling in use-element shadow trees to follow the event retargetting rules from the Shadow DOM spec.
Clarify that the copying of event listeners from referenced graphics to their element instances applies to listeners added by script as well as by event attributes.
Prohibit event listeners from being directly added to elements in the use-element shadow tree.
Make use elements and symbols map to the graphics-object role by default, so the shadow content will be accessible.
Make the SVGSymbolElement interface extend from SVGGraphicsElement, so that rendered symbol element instances have all the behavior of graphics elements (e.g., getBBox)
Restore the (animated)instanceRoot properties on the SVGUseElement interface.
Change role mapping for the ‘a’ element to depend on whether it is actually a valid link.
Mark ARIA state and property attributes as animatable.
Update requirements for ‘id’ values to harmonize with HTML, with extra warning about requirements for validity in an XML document.
Updated user agent style sheet - inner svg elements and foreignObject elements are no longer set as overflow:hidden.
Added hatch to list of elements with overflow:hidden in User Agent style sheet.
Set the default value of transform-origin to '0 0' for all elements except root svg elements and svg elements that are the child of a foreignObject element.
Substantially rewrote the chapter to be more concise.
Defined that HTML ‘link’ elements
must load external style sheets.
Specified the exact set of properties
that have presentation attributes, their names (when the presentation
attribute name does not match the property name), and on which elements
they are allowed.
Added a list of properties defined in other
specifications that conforming SVG 2 user agents must support.
Added User Agent style sheet rule to map the
deprecated ‘xml:space’ attribute to the
white-space property.
Required that @font-face rules and
::first-letter & ::first-line pseudo-elements on ‘text’
elements must be supported.
Required that all SVG and HTML
style sheets in an HTML document with inline SVG content must
apply to all content in the document.
Allow presentation attributes on any svg namespaced element.
Change display behavior of style element to be defined using user agent styles.
Add !important user agent style rules controlling never-rendered elements,
with a note explaining their impact.
Require interactive user agents to include :focus and ::selection styles.
Clean-up presentation attributes table to be consistent with other sections of the spec:
remove ‘mask’ from elements that treat x/y/width/height attributes as presentation attributes,
add ‘use’ and ‘symbol’;
exclude animation elements from those that treat fill as a presentation attribute;
remove d as a presentation attribute for ‘textPath’;
merge the discussion of gradientTransform and patternTransform into the main table.
Reorganized the Implementation Notes section into logical subsections
(including the section on out-of-bounds arc parameters,
which was formerly in the Implementation Notes appendix).
Edits
K.2.11. Basic Shapes chapter
The animatedPoints
IDL attributes of SVGAnimatedPoints now aliases the points
attribute.
Added the ‘pathLength’ attribute to all basic shapes.
Changed getComputedTextLength() to not include
‘dx’ and ‘dy’ values.
Moved the discussion of width
and height properties to the Geometry Properties chapter.
Require support for ::selection in interactive user agents.
Require that text in non-rendered elements are not included in addressable characters
and therefore are not counted when assigning positioning attributes
and in the getNumberOfChars methods.
Require that Unknown elements within text render as unpositioned spans,
but that known-but-invalidly-positioned elements do not.
Clarify that when text is positioned along a transformed path,
offset distances should be measured in the text element's coordinate system,
not the path element's.
Clarify the initial value for ‘textLength’,
and add note about its impact on the reflected IDL attribute.
Reverted to SVG 1.1 definition of addressable character for the
purposes of text positioning attributes (e.g. counting by Unicode
code points).
K.2.13. Embedded Content chapter (SVG 2 only)
Removed HTML multimedia section and the use of the audio, video, iframe, canvas elements due to lack of implementations.
Added this chapter, which includes new
'video', 'audio', 'iframe', 'canvas',
'source' and track'
elements that behave almost identically
to the equivalent HTML elements.
Removed the SVG copies of
HTML's embedded content elements and instead allowed those
elements to be used in the HTML namespace within SVG
container elements.
Removed the requirement to
ignore clip and overflow on an SVG document
when referenced by an ‘image’ element.
Allow image height and width to be "auto", determined from intrinsic dimensions or aspect ratio of the image file.
Clarify image and foreignObject sizing to be consistent with CSS and with geometry properties;
allow embedded HTML elements to be positioned using x, y, width, and height geometric properties.
Clarify that object-fit and object-position properties
apply to embedded HTML elements;
add warning note that they are not defined for ‘image’.
Moved the "Foreign namespaces and private data" section to the Document Structure chapter.
Updated the reference to the (abandoned) Resource Priorities spec to instead refer to the (working draft) Resource Hints spec.
Define unified layout model for all embedded elements,
including behavior of object-fit and object-position properties for ‘image’.
K.2.14. Painting chapter
Added more detail to the descriptions of the stroke properties and added algorithms
defining the exact shape a stroke must have.
Removed this chapter, replaced with normative reference to CSS Color.
K.2.16. Paint Servers chapter (called Gradients and Patterns in SVG 1.1)
Added the solidcolor element and its two properties solid-color
and solid-opacity, ported over from SVG Tiny 1.2. (Renamed 'solidColor' to
'solidcolor'.)
Added an ‘fr’ attribute to the ‘radialGradient’ element,
which allows specifying the radius of the focal circle.
Added a section for mesh gradients, defining the mesh, meshrow
and meshpatch elements. (Renamed 'meshGradient' to 'mesh', 'meshRow' to 'meshrow',
and 'meshPatch' to 'meshpatch'.)
Added a section for hatches, defining the hatch and hatchpath elements.
(Renamed 'hatchPath' to 'hatchpath'.)
Renamed ‘gradientTransform’ on the 'mesh' element
and ‘hatchTransform’ on the 'hatch' element to ‘transform’.
Change display behavior of paint server elements to be defined using user agent styles.
Define common handling of paint server template cross-references,
allowing external file references,
using a use-element shadow DOM model for cloned child content,
defining consistent behavior for whether title and desc affect child cloning,
and explicitly defining which attributes are derived from the template for each element.
Add notes warning about attributes that look like presentation attributes, but aren't.
Added the possibility to link to SVG resources with fragment identifiers defined by the Media Fragments specification.
Removed the ‘xlink:type’, ‘xlink:role’, ‘xlink:arcrole’, ‘xlink:show’ and ‘xlink:actuate’ attributes.
Deprecated the ‘xlink:href’ attribute in favor of using ‘href’ without a namespace.
Deprecated the ‘xlink:title’ attribute in favor of using child
‘title’ elements.
Allowed spaces in SVG view fragments.
Defined how "pixel:" and "percent:" spatial media
fragments are interpreted.
Made linking to ‘view’ elements not
cause an implicit view box transformation to show the nearest ancestor
‘svg’ element.
Clarified that unspecified SVG view fragment
parameters do not cause the corresponding attributes to be reset to their
initial values.
Removed the ‘viewTarget’ attribute
on the ‘view’ element and the corresponding SVG view fragment
parameter.
Fragment-only URLs are always same-document.
Added additional attributes on ‘a’ element to synchronize with HTML.
Create detailed instructions for processing URLs and external resource files.
Harmonized attributes and IDL properties on ‘a’ element with HTML,
other than ‘href’ and ‘target’
(which are maintained as-is for legacy reasons).
Specifically:
Added the ‘ping’ and ‘referrerpolicy’ attributes
and their matching IDL properties.
Added the text IDL property.
Specified the meaning of a non-empty value for ‘download’.
Made all attributes except ‘href’ and ‘target’ non-animatable,
with a simple read/write DOMString representation in the IDL.
Some informative text moved to a new Animation appendix.
K.2.23. Fonts chapter (SVG 1.1 only)
Added WOFF requirement, rearranged content.
Removed this chapter and the SVG Fonts
feature it contained, including the
‘font’,
‘glyph’,
‘missing-glyph’,
‘hkern’,
‘vkern’,
‘font-face’,
‘font-face-src’,
‘font-face-uri’,
‘font-face-format’ and
‘font-face-name’ elements
and their corresponding IDL interfaces.
(Remaining content merged into the Text chapter.)
K.2.24. Metadata chapter (SVG 1.1 only)
Merged the metadata chapter with the document structure chapter.
Made ‘width’ and ‘height’ presentation attributes on the ‘foreignObject’ element.
Merge this chapter into the new Embedded Content chapter
(and then later moved the "Foreign namespaces and private data" section to the Document Structure chapter.)
K.2.27. Document Type Definition appendix (SVG 1.1 only)
Removed this appendix, as SVG 2 is not defined in terms of a DTD.
K.2.28. SVG Document Object Model (DOM)(SVG 1.1 Only)
Update core DOM support requirement to DOM4, DOM Level 2 Views, UI Events, and DOM Level 2 Style/CSS.
'SVGException' interface is removed.
Section on (deprecated) 'hasFeature' method removed.
Non-SVG specific text about event and error handling removed.
Interfaces and methods that relied on the 'CSSValue' type removed (they were already deprecated in SVG 1.1).
Dependencies on other DOM specifications updated as follows:
Make DOM 4 a minimum requirement, with DOM living standard a "should".
Remove requirement for support of obsolete DOM View spec.
Update the requirement on DOM Level 2 Style to
only include interfaces also defined in CSSOM,
with full support for CSSOM as a "should".
(And remove the "Relationship with DOM Level 2 CSS" section.)
Add Geometry Interfaces Module Level 1 as a requirement.
Add Clipboard API and events as a normative requirement,
complementary to the UI Events requirement.
Clarify that SVG DOM requirements extend to elements defined in other specifications.
Add a requirement for handling unknown elements in the SVG namespace:
"must" handle as browsers currently do (as SVGElement instances);
"should" implement SVGUnknownElement interface (though that is at risk).
Remove the special rule for initializing textLength,
in favor of a clearer definition of the attribute's dynamic initial value.
Clarify that rules about initializing objects
only apply when reflecting (none) initial values,
and also apply to interfaces defined in other specifications (e.g., Geometry).
Update section "Relationship with UI Events"
to reflect that most event handler attributes are available on all elements,
that clipboard API events are available.
Wording is updated to clarify normative requirements on software.
Merge the entire content of this appendix
into the Basic Data Types chapter,
except for the section "Relationship with UI Events",
which is merged into the Interactivity chapter.
Moved normative sections into chapters,
and renamed appendix to Implementation Notes:
Error Processing is now in Conformance Criteria.
Clamping Values is now in Data Types and Interfaces,
and sections re colors and opacity have been removed
(clamping behavior of these properties is defined in CSS Color).
The normative parts of the Elliptical Arc Implementation Notes
are now in the Paths chapter, with other implementation requirements for paths
Text selection implementation notes is now in Text,
with the main section on Text Selection.
Printing Implementation Notes is now in Conformance Criteria.