The attributes that belong to the elements other elements refer to. Each is a plain attribute, not a property, so none can be set from CSS. Elements are described on gradients and patterns and clipping, masking and markers.
Gradients
| Attribute | Elements | Values (default) |
|---|---|---|
gradientUnits | linearGradient, radialGradient | objectBoundingBox (default) or userSpaceOnUse |
gradientTransform | both | a transform list |
spreadMethod | both | pad (default), reflect, repeat |
x1, y1, x2, y2 | linearGradient | 0%, 0%, 100%, 0% |
cx, cy, r | radialGradient | 50%, 50%, 50% |
fx, fy | radialGradient | the values of cx and cy |
fr | radialGradient | SVG 2: the radius of the focal circle (0%) |
offset | stop | number 0 to 1, or a percentage (0) |
href | both | another gradient to inherit from |
Patterns
| Attribute | Values (default) |
|---|---|
x, y, width, height | the tile; 0, 0, 0, 0. Width or height of 0 disables the pattern. |
patternUnits | objectBoundingBox (default) or userSpaceOnUse: what the tile numbers mean |
patternContentUnits | userSpaceOnUse (default) or objectBoundingBox: the units of the content. Ignored if viewBox is set. |
patternTransform | a transform list for the tiling |
viewBox, preserveAspectRatio | fit the content to the tile |
overflow | a property: hidden by the reader’s style, so content outside the tile is cut off |
href | another pattern to inherit attributes and content from |
Markers
| Attribute | Values (default) |
|---|---|
markerUnits | strokeWidth (default), userSpaceOnUse |
markerWidth, markerHeight | lengths (3). Zero disables the marker; a negative value is an error. |
refX, refY | the reference point in the marker’s content coordinates (0); SVG 2 also accepts left, center, right and top, center, bottom |
orient | angle (0), auto, auto-start-reverse |
viewBox, preserveAspectRatio | the marker’s own coordinates |
Clip paths and masks
| Attribute | Elements | Values (default) |
|---|---|---|
clipPathUnits | clipPath | userSpaceOnUse (default), objectBoundingBox |
maskUnits | mask | objectBoundingBox (default), userSpaceOnUse |
maskContentUnits | mask | userSpaceOnUse (default), objectBoundingBox |
x, y, width, height | mask | −10%, −10%, 120%, 120% |
mask-type | mask | luminance (default), alpha |
Not described
This page is partial.
- Reference: defaults and values were written without the specification texts open; the SVG 2 marker position keywords and
context-fillbehaviour are only mentioned. - Viewer: checks the enumerated values (units,
spreadMethod,orient), stop offsets and lengths. It does not resolve thehrefinheritance of gradients and patterns into effective values.