You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: motion-1/Overview.bs
+33-32Lines changed: 33 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -77,8 +77,8 @@ that can be applied to an element.
77
77
78
78
As described in [[css-transforms-2#ctm]],
79
79
the transforms defined by this document are layered
80
-
after the [=individual transform properties=]
81
-
(defined in [[css-transforms-2]])
80
+
after the individual transform properties
81
+
('translate'/'rotate'/'scale', defined in [[css-transforms-2]])
82
82
and before the 'transform' property
83
83
(defined in [[css-transforms-1]]).
84
84
@@ -144,61 +144,62 @@ Values have the following meanings:
144
144
: <<ray()>>
145
145
::
146
146
The [=offset path=] is a line extending from the [=initial position=]
147
+
at some angle.
148
+
See [[#ray-function]] for details.
147
149
148
-
149
-
150
-
: <<basic-shape>> && <<coord-box>>?
150
+
: <<basic-shape>>
151
151
::
152
152
The <a>offset path</a> is a basic shape as specified in CSS Shapes [[!CSS-SHAPES]].
153
153
154
-
'offset-position' is ignored for circle and ellipse basic shapes with explicit center positions, and for other types of basic shapes. If a circle or ellipse basic shape has no explicit center position, the shape is centered at the <var>initial position</var> of the path, as described in 'offset-position'.
154
+
'offset-position' is ignored for circle and ellipse basic shapes with explicit center positions, and for other types of basic shapes. If a circle or ellipse basic shape has no explicit center position, the shape is centered at the [=initial position=] of the path, as described in 'offset-position'.
155
155
156
-
The <var>initial position</var> for basic shapes are defined as follows:
156
+
The [=initial position=] for basic shapes are defined as follows:
157
157
158
158
: <<path()>>
159
159
::
160
-
The <var>initial position</var> is defined by the first “move to” argument in the path string. For the initial direction follow SVG 1.1 [[!SVG11]].
160
+
The [=initial position=] is defined by the first “move to” argument in the path string. For the initial direction follow SVG 1.1 [[!SVG11]].
161
161
: <<circle()>>
162
162
: <<ellipse()>>
163
163
::
164
-
The <var>initial position</var> is defined by the point where a horizontal tangent to the circle/ellipse would reach the top vertical position.
164
+
The [=initial position=] is defined by the point where a horizontal tangent to the circle/ellipse would reach the top vertical position.
165
+
165
166
: <<inset()>>
166
167
::
167
-
The <var>initial position</var> is the left end of the top horizontal line, immediately to the right of any 'border-radius' arc.
168
+
The [=initial position=] is the left end of the top horizontal line, immediately to the right of any 'border-radius' arc.
168
169
: <<polygon()>>
169
170
::
170
-
The <var>initial position</var> is defined by the first coordinate pair of the polygon.
171
+
The [=initial position=] is defined by the first coordinate pair of the polygon.
171
172
172
173
The <var>initial direction</var> is defined by the vector connecting.
173
174
174
-
the <var>initial position</var> with the next following coordinate pair that isn't equal to the <var>initial position</var>.
175
+
the [=initial position=] with the next following coordinate pair that isn't equal to the [=initial position=].
175
176
176
177
The <<coord-box>> specified in combination with a <<basic-shape>> provides the reference box for the <<basic-shape>>. If no reference box is specified, it defaults to ''<coord-box>/border-box''.
177
178
178
179
Apart from polygons with non-zero length, the <var>initial direction</var> is 90 degrees (i.e. to the right).
179
180
180
-
Note: This gives ''0deg'' rotation when 'offset-rotate' is ''auto''.
181
+
Note: This gives ''0deg'' rotation when 'offset-rotate' is ''offset-rotate/auto''.
181
182
182
183
: <<coord-box>>
183
184
::
184
185
The [=offset path=] is the specified [=edge=] of the box,
185
186
including the effect of any 'border-radius'.
186
187
187
-
The <var>initial position</var> is the left end of the top horizontal line,
188
+
The [=initial position=] is the left end of the top horizontal line,
188
189
immediately to the right of any 'border-radius' arc,
189
190
and the <var>initial direction</var> is to the right.
190
191
191
192
: <<url>>
192
193
::
193
194
References an SVG <a>shape element</a> and uses its geometry as <a>offset path</a>.
194
-
See SVG 1.1 for more information about the <var>initial position</var> and <var>initial direction</var>[[!SVG11]].
195
+
See SVG 1.1 for more information about the [=initial position=] and <var>initial direction</var>[[!SVG11]].
No <a>offset path</a> gets created. When 'offset-path' is <a href="#offsetpath-none">none</a>, 'offset-distance' and 'offset-rotate' have no effect.
199
200
</dl>
200
201
201
-
A computed value of other than <a href="#offsetpath-none">none</a> results in the creation of a <a>stacking context</a>[[!CSS21]] and <a href="https://www.w3.org/TR/CSS2/visuren.html#containing-block">containing block</a>, per usual for <a href="https://drafts.csswg.org/css-transforms-1/#propdef-transform">transforms</a>.
202
+
A computed value of other than <a href="#offsetpath-none">none</a> results in the creation of a <a>stacking context</a>[[!CSS21]] and [=containing block=], per usual for 'transform'.
202
203
203
204
A reference that fails to download, is not a reference to an SVG <a>shape element</a>, or is non-existent, is treated as equivalent to <code>path("m 0 0")</code>.
204
205
@@ -249,7 +250,7 @@ Its arguments are:
249
250
Specifies the length of the [=offset path=]
250
251
(the distance between the ''offset-distance: 0%''
251
252
and ''offset-distance: 100%'' points)
252
-
relative to the [=containing box=].
253
+
relative to the containing box.
253
254
254
255
If no <<ray-size>> is specified it defaults to ''closest-side''.
255
256
@@ -542,9 +543,9 @@ Specifies the position of the box as a distance along the <a>offset path</a>.
542
543
<dl dfn-for="offset-distance" dfn-type="value">
543
544
: <<length-percentage>>
544
545
::
545
-
Specifies the distance from the <var>initial position</var> of the <a>offset path</a> to the position of the box’s <a>anchor point</a>.
546
+
Specifies the distance from the [=initial position=] of the <a>offset path</a> to the position of the box’s <a>anchor point</a>.
546
547
547
-
Percentages are relative to the length of the <a>offset path</a>-- that is, the distance between the <var>initial position</var> and the end position of the <a>offset path</a>.
548
+
Percentages are relative to the length of the <a>offset path</a>-- that is, the distance between the [=initial position=] and the end position of the <a>offset path</a>.
548
549
</dl>
549
550
550
551
### Calculating the computed distance along a path ### {#calculating-the-computed-distance-along-a-path}
@@ -765,7 +766,7 @@ Values are defined as follows:
765
766
</code></pre>
766
767
<figure>
767
768
<img alt="An image of offset-position: auto" src="images/offset_position_auto.png" width="300"/>
768
-
<figcaption>An example when ''auto'' is given to 'offset-position'</figcaption>
769
+
<figcaption>An example when ''offset-position/auto'' is given to 'offset-position'</figcaption>
769
770
</figure>
770
771
</div>
771
772
@@ -1176,18 +1177,18 @@ Values have the following meanings:
1176
1177
<dl dfn-for="offset-rotate" dfn-type="value">
1177
1178
: <dfn>auto</dfn>
1178
1179
::
1179
-
Indicates that the object is rotated (over time if 'offset-distance' is animated) by the angle of the direction (i.e., directional tangent vector) of the <a>offset path</a>, relative to the positive x-axis. If specified in combination with <<angle>>, the computed value of <<angle>> is added to the computed value of ''auto''.
1180
+
Indicates that the object is rotated (over time if 'offset-distance' is animated) by the angle of the direction (i.e., directional tangent vector) of the <a>offset path</a>, relative to the positive x-axis. If specified in combination with <<angle>>, the computed value of <<angle>> is added to the computed value of ''offset-rotate/auto''.
1180
1181
1181
-
Note: For ray paths, the rotation implied by ''auto'' is 90 degrees less than the ray's bearing <<angle>>.
1182
+
Note: For ray paths, the rotation implied by ''offset-rotate/auto'' is 90 degrees less than the ray's bearing <<angle>>.
1182
1183
1183
1184
: <dfn>reverse</dfn>
1184
1185
::
1185
-
Indicates that the object is rotated (over time if 'offset-distance' is animated) by the angle of the direction (i.e., directional tangent vector) of the <a>offset path</a>, relative to the positive x-axis, plus 180 degrees. If specified in combination with <<angle>>, the computed value of <<angle>> is added to the computed value of ''reverse''.
1186
+
Indicates that the object is rotated (over time if 'offset-distance' is animated) by the angle of the direction (i.e., directional tangent vector) of the <a>offset path</a>, relative to the positive x-axis, plus 180 degrees. If specified in combination with <<angle>>, the computed value of <<angle>> is added to the computed value of ''offset-rotate/reverse''.
1186
1187
1187
1188
Note: This is the same as specifying ''auto 180deg''.
1188
-
: <<angle>>
1189
+
: <dfn><<angle>></dfn>
1189
1190
::
1190
-
Indicates that the box has a constant clockwise rotation transformation applied to it by the specified rotation angle. See definitions of ''auto'' or ''reverse'' if specified in combination with either one of the keywords.
1191
+
Indicates that the box has a constant clockwise rotation transformation applied to it by the specified rotation angle. See definitions of ''offset-rotate/auto'' or ''offset-rotate/reverse'' if specified in combination with either one of the keywords.
1191
1192
</dl>
1192
1193
1193
1194
When the <a>offset path</a> is a zero length path, the value of 'offset-rotate' is 0 degree, the direction of the positive x-axis.
@@ -1213,7 +1214,7 @@ When the shape's <a>anchor point</a> is placed at different positions along the
1213
1214
rotation transforms.</figcaption>
1214
1215
</figure>
1215
1216
1216
-
If the 'offset-rotate' property is set to ''auto'', and the shape's <a>anchor point</a> is placed at different positions along the path, the shape is rotated based on the gradient at the current position and faces the direction of the path at this position.
1217
+
If the 'offset-rotate' property is set to ''offset-rotate/auto'', and the shape's <a>anchor point</a> is placed at different positions along the path, the shape is rotated based on the gradient at the current position and faces the direction of the path at this position.
1217
1218
1218
1219
<figure>
1219
1220
<img src="images/offset-rotate-auto.svg" width="470" height="120" alt="Path with auto rotation">
@@ -1239,9 +1240,9 @@ The last example sets the 'offset-rotate' property to ''-45deg''. The shape is r
1239
1240
</div>
1240
1241
1241
1242
<div class=example>
1242
-
This example shows how ''auto'' or ''reverse'' work when specified in combination
1243
+
This example shows how ''offset-rotate/auto'' or ''offset-rotate/reverse'' work when specified in combination
1243
1244
with <<angle>>.
1244
-
The computed value of <<angle>> is added to the computed value of ''auto'' or ''reverse''.
1245
+
The computed value of <<angle>> is added to the computed value of ''offset-rotate/auto'' or ''offset-rotate/reverse''.
1245
1246
1246
1247
<pre><code highlight=html>
1247
1248
<style>
@@ -1299,7 +1300,7 @@ The computed value of <<angle>> is added to the computed value of ''auto'' or ''
1299
1300
</code></pre>
1300
1301
<figure>
1301
1302
<img alt="An image of example for offset-rotate" src="images/rotate_by_angle_with_auto.png" style="width: 250px; text-align: center"/>
1302
-
<figcaption>The boxes are rotated by the value of ''auto'' with a fixed amount of degree.</figcaption>
1303
+
<figcaption>The boxes are rotated by the value of ''offset-rotate/auto'' with a fixed amount of degree.</figcaption>
1303
1304
</figure>
1304
1305
</div>
1305
1306
@@ -1308,7 +1309,7 @@ The computed value of <<angle>> is added to the computed value of ''auto'' or ''
1308
1309
1309
1310
<div class=switch>
1310
1311
1. Create a supplemental transformation matrix <dfn>T1</dfn> for the local coordinate system of the box.
1311
-
2. Find the <var>initial position</var> of the <a>offset path</a> specified by 'offset-position' as <dfn>T2</dfn>.
1312
+
2. Find the [=initial position=] of the <a>offset path</a> specified by 'offset-position' as <dfn>T2</dfn>.
1312
1313
3. Let <dfn>P</dfn> be the point at the <a>used offset distance</a> along the <a>offset path</a>.
1313
1314
4. Find the translation of the box such that its <a>anchor point</a> is placed at <a>P</a>, and apply that to <a>T2</a>.
1314
1315
5. Post-multiply <a>T2</a> by the rotation specified by 'offset-rotate'.
@@ -1364,10 +1365,10 @@ The following changes were made since the <a href="https://www.w3.org/TR/2015/WD
1364
1365
* Added <<size>> and 'contain' value for the ''ray()''.
1365
1366
* Renamed <a href="https://www.w3.org/TR/2015/WD-motion-1-20150409/#propdef-motion-offset">motion-offset</a> to 'offset-distance' for integrating with <a href="https://www.w3.org/TR/2016/WD-css-round-display-1-20160301/#polar-distance-property">polar-distance</a>.
1366
1367
* Renamed <a href="https://www.w3.org/TR/2015/WD-motion-1-20150409/#propdef-motion-rotation">motion-rotation</a> to 'offset-rotate'.
1367
-
* Added 'offset-position' to specify the <var>initial position</var> of the path by merging <a href="https://www.w3.org/TR/2016/WD-css-round-display-1-20160301/#polar-origin-property">polar-origin</a> from [[CSS-ROUND-DISPLAY-1]].
1368
+
* Added 'offset-position' to specify the [=initial position=] of the path by merging <a href="https://www.w3.org/TR/2016/WD-css-round-display-1-20160301/#polar-origin-property">polar-origin</a> from [[CSS-ROUND-DISPLAY-1]].
1368
1369
* Added 'offset-anchor' to specify the origin point of the element by merging <a href="https://www.w3.org/TR/2016/WD-css-round-display-1-20160301/#polar-anchor-property">polar-anchor</a> from [[CSS-ROUND-DISPLAY-1]].
1369
1370
* Renamed the shorthand property <a href="https://www.w3.org/TR/2015/WD-motion-1-20150409/#propdef-motion">motion</a> to 'offset'.
1370
-
* Made 'offset-rotate' specify the rotation transformation by ''auto'' or ''reverse'' in combination with <<angle>>.
1371
+
* Made 'offset-rotate' specify the rotation transformation by ''offset-rotate/auto'' or ''offset-rotate/reverse'' in combination with <<angle>>.
0 commit comments