-
Notifications
You must be signed in to change notification settings - Fork 76
/
css-transforms-2.json
329 lines (329 loc) · 14.9 KB
/
css-transforms-2.json
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
{
"spec": {
"title": "CSS Transforms Module Level 2",
"url": "https://drafts.csswg.org/css-transforms-2/"
},
"properties": [
{
"name": "translate",
"href": "https://drafts.csswg.org/css-transforms-2/#propdef-translate",
"value": "none | <length-percentage> [ <length-percentage> <length>? ]?",
"initial": "none",
"appliesTo": "transformable elements",
"inherited": "no",
"percentages": "relative to the width of the reference box (for the first value) or the height (for the second value)",
"computedValue": "the keyword none or a pair of computed <length-percentage> values and an absolute length",
"canonicalOrder": "per grammar",
"animationType": "by computed value, but see below for none",
"values": [
{
"name": "none",
"prose": "All three properties accept (and default to) the value none, which produces no transform at all. In particular, this value does not trigger the creation of a stacking context or containing block for all descendants, while all other values (including “identity” transforms like translate: 0px) create a stacking context and containing block for all descendants, per usual for transforms.",
"href": "https://drafts.csswg.org/css-transforms-2/#valdef-translate-none",
"type": "value",
"value": "none"
}
],
"styleDeclaration": [
"translate"
]
},
{
"name": "rotate",
"href": "https://drafts.csswg.org/css-transforms-2/#propdef-rotate",
"value": "none | <angle> | [ x | y | z | <number>{3} ] && <angle>",
"initial": "none",
"appliesTo": "transformable elements",
"inherited": "no",
"percentages": "n/a",
"computedValue": "the keyword none, or an <angle> with an axis consisting of a list of three <number>s",
"canonicalOrder": "per grammar",
"animationType": "as SLERP, but see below for none",
"values": [
{
"name": "x",
"prose": "The axis can be specified with either the x, y, or z keywords, which specify a rotation around that axis, equivalent to the rotateX(), rotateY(), and rotateZ() transform functions. Alternately, the axis can be specified explicitly by giving three numbers representing the x, y, and z components of an origin-centered vector, equivalent to the rotate3d() function.",
"href": "https://drafts.csswg.org/css-transforms-2/#valdef-rotate-x",
"type": "value",
"value": "x"
},
{
"name": "y",
"prose": "The axis can be specified with either the x, y, or z keywords, which specify a rotation around that axis, equivalent to the rotateX(), rotateY(), and rotateZ() transform functions. Alternately, the axis can be specified explicitly by giving three numbers representing the x, y, and z components of an origin-centered vector, equivalent to the rotate3d() function.",
"href": "https://drafts.csswg.org/css-transforms-2/#valdef-rotate-y",
"type": "value",
"value": "y"
},
{
"name": "z",
"prose": "The axis can be specified with either the x, y, or z keywords, which specify a rotation around that axis, equivalent to the rotateX(), rotateY(), and rotateZ() transform functions. Alternately, the axis can be specified explicitly by giving three numbers representing the x, y, and z components of an origin-centered vector, equivalent to the rotate3d() function.",
"href": "https://drafts.csswg.org/css-transforms-2/#valdef-rotate-z",
"type": "value",
"value": "z"
},
{
"name": "none",
"prose": "All three properties accept (and default to) the value none, which produces no transform at all. In particular, this value does not trigger the creation of a stacking context or containing block for all descendants, while all other values (including “identity” transforms like translate: 0px) create a stacking context and containing block for all descendants, per usual for transforms.",
"href": "https://drafts.csswg.org/css-transforms-2/#valdef-translate-none",
"type": "value",
"value": "none"
}
],
"styleDeclaration": [
"rotate"
]
},
{
"name": "scale",
"href": "https://drafts.csswg.org/css-transforms-2/#propdef-scale",
"value": "none | [ <number> | <percentage> ]{1,3}",
"initial": "none",
"appliesTo": "transformable elements",
"inherited": "no",
"percentages": "n/a",
"computedValue": "the keyword none, or a list of 3 <number>s",
"canonicalOrder": "per grammar",
"animationType": "by computed value, but see below for none",
"values": [
{
"name": "none",
"prose": "All three properties accept (and default to) the value none, which produces no transform at all. In particular, this value does not trigger the creation of a stacking context or containing block for all descendants, while all other values (including “identity” transforms like translate: 0px) create a stacking context and containing block for all descendants, per usual for transforms.",
"href": "https://drafts.csswg.org/css-transforms-2/#valdef-translate-none",
"type": "value",
"value": "none"
}
],
"styleDeclaration": [
"scale"
]
},
{
"name": "transform-style",
"href": "https://drafts.csswg.org/css-transforms-2/#propdef-transform-style",
"value": "flat | preserve-3d",
"initial": "flat",
"appliesTo": "transformable elements",
"inherited": "no",
"percentages": "N/A",
"computedValue": "specified keyword",
"canonicalOrder": "per grammar",
"animationType": "discrete",
"usedValue": "flat if a grouping property is present, specified keyword otherwise",
"styleDeclaration": [
"transform-style",
"transformStyle"
]
},
{
"name": "perspective",
"href": "https://drafts.csswg.org/css-transforms-2/#propdef-perspective",
"value": "none | <length [0,∞]>",
"initial": "none",
"appliesTo": "transformable elements",
"inherited": "no",
"percentages": "N/A",
"computedValue": "the keyword none or an absolute length",
"canonicalOrder": "per grammar",
"animationType": "by computed value",
"values": [
{
"name": "<length [0,∞]>",
"prose": "Distance to the center of projection. Verify that projection is the distance to the center of projection. As very small <length> values can produce bizarre rendering results and stress the numerical accuracy of transform calculations, values less than 1px must be treated as 1px for rendering purposes. (This clamping does not affect the underlying value, so perspective: 0; in a stylesheet will still serialize back as 0.)",
"href": "https://drafts.csswg.org/css-transforms-2/#valdef-perspective-length-0",
"type": "value",
"value": "<length [0,∞]>"
},
{
"name": "none",
"prose": "No perspective transform is applied. The effect is mathematically similar to an infinite <length> value. All objects appear to be flat on the canvas.",
"href": "https://drafts.csswg.org/css-transforms-2/#valdef-perspective-none",
"type": "value",
"value": "none"
}
],
"styleDeclaration": [
"perspective"
]
},
{
"name": "perspective-origin",
"href": "https://drafts.csswg.org/css-transforms-2/#propdef-perspective-origin",
"value": "<position>",
"initial": "50% 50%",
"appliesTo": "transformable elements",
"inherited": "no",
"percentages": "refer to the size of the reference box",
"computedValue": "see background-position",
"canonicalOrder": "per grammar",
"animationType": "by computed value",
"values": [
{
"name": "<percentage>",
"prose": "A percentage for the horizontal perspective offset is relative to the width of the reference box. A percentage for the vertical offset is relative to height of the reference box. The value for the horizontal and vertical offset represent an offset from the top left corner of the reference box.",
"href": "https://drafts.csswg.org/css-transforms-2/#valdef-perspective-origin-percentage",
"type": "value",
"value": "<percentage>"
},
{
"name": "<length>",
"prose": "A length value gives a fixed length as the offset. The value for the horizontal and vertical offset represent an offset from the top left corner of the reference box.",
"href": "https://drafts.csswg.org/css-transforms-2/#valdef-perspective-origin-length",
"type": "value",
"value": "<length>"
},
{
"name": "top",
"prose": "Computes to 0% for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset.",
"href": "https://drafts.csswg.org/css-transforms-2/#valdef-perspective-origin-top",
"type": "value",
"value": "top"
},
{
"name": "right",
"prose": "Computes to 100% for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",
"href": "https://drafts.csswg.org/css-transforms-2/#valdef-perspective-origin-right",
"type": "value",
"value": "right"
},
{
"name": "bottom",
"prose": "Computes to 100% for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.",
"href": "https://drafts.csswg.org/css-transforms-2/#valdef-perspective-origin-bottom",
"type": "value",
"value": "bottom"
},
{
"name": "left",
"prose": "Computes to 0% for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",
"href": "https://drafts.csswg.org/css-transforms-2/#valdef-perspective-origin-left",
"type": "value",
"value": "left"
},
{
"name": "center",
"prose": "Computes to 50% (left 50%) for the horizontal position if the horizontal position is not otherwise specified, or 50% (top 50%) for the vertical position if it is.",
"href": "https://drafts.csswg.org/css-transforms-2/#valdef-perspective-origin-center",
"type": "value",
"value": "center"
}
],
"styleDeclaration": [
"perspective-origin",
"perspectiveOrigin"
]
},
{
"name": "backface-visibility",
"href": "https://drafts.csswg.org/css-transforms-2/#propdef-backface-visibility",
"value": "visible | hidden",
"initial": "visible",
"appliesTo": "transformable elements",
"inherited": "no",
"percentages": "N/A",
"computedValue": "specified keyword",
"canonicalOrder": "per grammar",
"animationType": "discrete",
"styleDeclaration": [
"backface-visibility",
"backfaceVisibility"
]
}
],
"atrules": [],
"selectors": [],
"values": [
{
"name": "<transform-function>",
"prose": "The value of the transform property is a list of <transform-function>. The set of allowed transform functions is given below. Wherever <angle> is used in this specification, a <number> that is equal to zero is also allowed, which is treated the same as an angle of zero degrees. A percentage for horizontal translations is relative to the width of the reference box. A percentage for vertical translations is relative to the height of the reference box. A percentage in a scale function is equivalent to a number, and serializes as a number in specified values. For example, scale3d(50%, 100%, 150%) serializes as scale3d(0.5, 1, 1.5).",
"href": "https://drafts.csswg.org/css-transforms-2/#typedef-transform-function",
"type": "type"
},
{
"name": "scale()",
"value": "scale( [ <number> | <percentage> ]#{1,2} )",
"href": "https://drafts.csswg.org/css-transforms-2/#funcdef-scale",
"type": "function"
},
{
"name": "scaleX()",
"value": "scaleX( [ <number> | <percentage> ] )",
"href": "https://drafts.csswg.org/css-transforms-2/#funcdef-scalex",
"type": "function"
},
{
"name": "scaleY()",
"value": "scaleY( [ <number> | <percentage> ] )",
"href": "https://drafts.csswg.org/css-transforms-2/#funcdef-scaley",
"type": "function"
},
{
"name": "matrix3d()",
"value": "matrix3d( <number>#{16} )",
"href": "https://drafts.csswg.org/css-transforms-2/#funcdef-matrix3d",
"type": "function"
},
{
"name": "translate3d()",
"value": "translate3d( <length-percentage> , <length-percentage> , <length> )",
"href": "https://drafts.csswg.org/css-transforms-2/#funcdef-translate3d",
"type": "function"
},
{
"name": "translateZ()",
"value": "translateZ( <length> )",
"href": "https://drafts.csswg.org/css-transforms-2/#funcdef-translatez",
"type": "function"
},
{
"name": "scale3d()",
"value": "scale3d( [ <number> | <percentage> ]#{3} )",
"href": "https://drafts.csswg.org/css-transforms-2/#funcdef-scale3d",
"type": "function"
},
{
"name": "scaleZ()",
"value": "scaleZ( [ <number> | <percentage> ] )",
"href": "https://drafts.csswg.org/css-transforms-2/#funcdef-scalez",
"type": "function"
},
{
"name": "rotate3d()",
"value": "rotate3d( <number> , <number> , <number> , [ <angle> | <zero> ] )",
"href": "https://drafts.csswg.org/css-transforms-2/#funcdef-rotate3d",
"type": "function"
},
{
"name": "rotateX()",
"value": "rotateX( [ <angle> | <zero> ] )",
"href": "https://drafts.csswg.org/css-transforms-2/#funcdef-rotatex",
"type": "function"
},
{
"name": "rotateY()",
"value": "rotateY( [ <angle> | <zero> ] )",
"href": "https://drafts.csswg.org/css-transforms-2/#funcdef-rotatey",
"type": "function"
},
{
"name": "rotateZ()",
"value": "rotateZ( [ <angle> | <zero> ] )",
"href": "https://drafts.csswg.org/css-transforms-2/#funcdef-rotatez",
"type": "function"
},
{
"name": "perspective()",
"value": "perspective( [ <length [0,∞]> | none ] )",
"href": "https://drafts.csswg.org/css-transforms-2/#funcdef-perspective",
"type": "function",
"values": [
{
"name": "none",
"prose": "perspective() = perspective( [ <length [0,∞]> | none ] )",
"href": "https://drafts.csswg.org/css-transforms-2/#valdef-perspective-func-none",
"type": "value",
"value": "none"
}
]
}
]
}