-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
96 lines (80 loc) · 3.15 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
title: values
slug: Web/SVG/Attribute/values
page-type: svg-attribute
spec-urls:
- https://drafts.fxtf.org/filter-effects/#element-attrdef-fecolormatrix-values
- https://svgwg.org/specs/animations/#ValuesAttribute
---
{{SVGRef}}
The `values` attribute has different meanings, depending upon the context where it's used, either it defines a sequence of values used over the course of an animation, or it's a list of numbers for a color matrix, which is interpreted differently depending on the type of color change to be performed.
You can use this attribute with the following SVG elements:
- {{SVGElement("animate")}}
- {{SVGElement("animateMotion")}}
- {{SVGElement("animateTransform")}}
- {{SVGElement("feColorMatrix")}}
## animate, animateMotion, animateTransform
For {{SVGElement("animate")}}, {{SVGElement("animateMotion")}}, and {{SVGElement("animateTransform")}}, `values` is a list of values defining the sequence of values over the course of the animation. If this attribute is specified, any {{SVGAttr("from")}}, {{SVGAttr("to")}}, and {{SVGAttr("by")}} attribute values set on the element are ignored.
<table class="properties">
<tbody>
<tr>
<th scope="row">Value</th>
<td>
<code
><a href="/en-US/docs/Web/SVG/Content_type#list-of-ts"
><list-of-values></a
></code
>
</td>
</tr>
<tr>
<th scope="row">Default value</th>
<td><em>None</em></td>
</tr>
<tr>
<th scope="row">Animatable</th>
<td>No</td>
</tr>
</tbody>
</table>
- `<list-of-values>`
- : The value holds a semicolon-separated list of one or more values. The type of the values is defined by the {{SVGAttr("href")}} and {{SVGAttr("attributeName")}} attributes.
## feColorMatrix
For the {{SVGElement("feColorMatrix")}} element, `values` is a list of numbers interpreted differently depending on the value of the {{SVGAttr("type")}} attribute.
<table class="properties">
<tbody>
<tr>
<th scope="row">Value</th>
<td>
<code
><a href="/en-US/docs/Web/SVG/Content_type#list-of-ts"
><list-of-numbers></a
></code
>
</td>
</tr>
<tr>
<th scope="row">Default value</th>
<td>
<em
>If <code>type="matrix"</code>, identity matrix,<br />if
<code>type="saturate"</code>, <code>1</code>, resulting in identity
matrix,<br />if <code>type="hueRotate"</code>, <code>0</code>,
resulting in identity matrix</em
>
</td>
</tr>
<tr>
<th scope="row">Animatable</th>
<td>Yes</td>
</tr>
</tbody>
</table>
- `<list-of-numbers>`
- : The value is a list of numbers, which is interpreted differently depending on the value of the `type` attribute:
- For `type="matrix"`, `values` is a list of 20 matrix values (a00 a01 a02 a03 a04 a10 a11 … a34), separated by whitespace and/or a comma.
- For `type="saturate"`, `values` is a single real number value (0 to 1).
- For `type="hueRotate"`, `values` is a single one real number value (degrees).
- For `type="luminanceToAlpha"`, `values` is not applicable.
## Specifications
{{Specifications}}