Skip to content

Commit 7f560e9

Browse files
committed
2010-03-23 simon.fraser@apple.com
- changed transform-origin definition to match background-origin. - clarify that transform-origin is relative to the border box.
1 parent 02ac24f commit 7f560e9

3 files changed

Lines changed: 105 additions & 61 deletions

File tree

css3-2d-transforms/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2010-03-23 simon.fraser@apple.com
2+
3+
- changed transform-origin definition to match background-origin.
4+
- clarify that transform-origin is relative to the border box.
5+
16
2009-11-17 dino@apple.com
27

38
- removed the suggestion that position: relative could trigger a

css3-2d-transforms/Overview.html

Lines changed: 72 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,14 @@
2121

2222
<h1>CSS 2D Transforms Module Level 3</h1>
2323

24-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 17 November
25-
2009</h2>
24+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 23 March 2010</h2>
2625

2726
<dl>
2827
<dt>This version:
2928

3029
<dd> <a
31-
href="http://www.w3.org/TR/2009/ED-css3-2d-transforms-20091117">http://dev.w3.org/csswg/css3-2d-transforms/</a>
32-
<!--http://www.w3.org/TR/2009/WD-css3-2d-transforms-20091117-->
30+
href="http://www.w3.org/TR/2010/ED-css3-2d-transforms-20100323">http://dev.w3.org/csswg/css3-2d-transforms/</a>
31+
<!--http://www.w3.org/TR/2010/WD-css3-2d-transforms-20100323-->
3332

3433
<dt>Latest version:
3534

@@ -56,13 +55,13 @@ <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 17 November
5655
<!--begin-copyright-->
5756
<p class=copyright><a
5857
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
59-
rel=license>Copyright</a> &copy; 2009 <a
58+
rel=license>Copyright</a> &copy; 2010 <a
6059
href="http://www.w3.org/"><acronym title="World Wide Web
6160
Consortium">W3C</acronym></a><sup>&reg;</sup> (<a
6261
href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute
63-
of Technology">MIT</acronym></a>, <a
64-
href="http://www.ercim.org/"><acronym title="European Research Consortium
65-
for Informatics and Mathematics">ERCIM</acronym></a>, <a
62+
of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/"><acronym
63+
title="European Research Consortium for Informatics and
64+
Mathematics">ERCIM</acronym></a>, <a
6665
href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a
6766
href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
6867
<a
@@ -89,11 +88,13 @@ <h2 class="no-num no-toc" id=status>Status of this document</h2>
8988

9089
<p>The (<a
9190
href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public
92-
mailing list <a href="mailto:www-style@w3.org">www-style@w3.org</a> (see
93-
<a href="http://www.w3.org/Mail/Request">instructions</a>) is preferred
94-
for discussion of this specification. When sending e-mail, please put the
95-
text &#8220;css3-2d-transforms&#8221; in the subject, preferably like
96-
this: &#8220;[<!---->css3-2d-transforms<!---->] <em>&hellip;summary of
91+
mailing list <a
92+
href="mailto:www-style@w3.org?Subject=%5Bcss3-2d-transforms%5D%20PUT%20SUBJECT%20HERE">
93+
www-style@w3.org</a> (see <a
94+
href="http://www.w3.org/Mail/Request">instructions</a>) is preferred for
95+
discussion of this specification. When sending e-mail, please put the text
96+
&#8220;css3-2d-transforms&#8221; in the subject, preferably like this:
97+
&#8220;[<!---->css3-2d-transforms<!---->] <em>&hellip;summary of
9798
comment&hellip;</em>&#8221;
9899

99100
<p>This document was produced by the <a href="/Style/CSS/members">CSS
@@ -119,36 +120,36 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
119120
<!--begin-toc-->
120121

121122
<ul class=toc>
122-
<li><a href="#introduction"><span class=secno>1 </span>Introduction</a>
123+
<li><a href="#introduction"><span class=secno>1. </span>Introduction</a>
123124

124-
<li><a href="#transform-property"><span class=secno>2 </span> The <span
125+
<li><a href="#transform-property"><span class=secno>2. </span> The <span
125126
class=prop-name>&lsquo;<code
126127
class=property>transform</code>&rsquo;</span> Property </a>
127128

128-
<li><a href="#transform-origin-property"><span class=secno>3 </span> The
129+
<li><a href="#transform-origin-property"><span class=secno>3. </span> The
129130
<span class=prop-name>&lsquo;<code
130131
class=property>transform-origin</code>&rsquo;</span> Property </a>
131132

132-
<li><a href="#transform-functions"><span class=secno>4 </span> The
133+
<li><a href="#transform-functions"><span class=secno>4. </span> The
133134
Transformation Functions </a>
134135

135-
<li><a href="#transform-values"><span class=secno>5 </span> Transform
136+
<li><a href="#transform-values"><span class=secno>5. </span> Transform
136137
Values and Lists </a>
137138

138-
<li><a href="#animation"><span class=secno>6 </span> Transitions and
139+
<li><a href="#animation"><span class=secno>6. </span> Transitions and
139140
animations between transform values </a>
140141

141-
<li><a href="#matrix-decomposition"><span class=secno>7 </span> Matrix
142+
<li><a href="#matrix-decomposition"><span class=secno>7. </span> Matrix
142143
decomposition for animation </a>
143144

144-
<li><a href="#dom-interfaces"><span class=secno>8 </span> DOM Interfaces
145+
<li><a href="#dom-interfaces"><span class=secno>8. </span> DOM Interfaces
145146
</a>
146147
<ul class=toc>
147-
<li><a href="#cssmatrix-interface"><span class=secno>8.1 </span>
148+
<li><a href="#cssmatrix-interface"><span class=secno>8.1. </span>
148149
CSSMatrix </a>
149150
</ul>
150151

151-
<li><a href="#references"><span class=secno>9 </span>References</a>
152+
<li><a href="#references"><span class=secno>9. </span>References</a>
152153
<ul class=toc>
153154
<li class=no-num><a href="#normative-references">Normative
154155
references</a>
@@ -162,7 +163,7 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
162163
</ul>
163164
<!--end-toc-->
164165

165-
<h2 id=introduction><span class=secno>1 </span>Introduction</h2>
166+
<h2 id=introduction><span class=secno>1. </span>Introduction</h2>
166167

167168
<p><em>This section is not normative.</em>
168169

@@ -245,7 +246,7 @@ <h2 id=introduction><span class=secno>1 </span>Introduction</h2>
245246
to set the correct transform.</div>
246247
<!-- ======================================================================================================= -->
247248

248-
<h2 id=transform-property><span class=secno>2 </span> The <span
249+
<h2 id=transform-property><span class=secno>2. </span> The <span
249250
class=prop-name>&lsquo;<code class=property><a
250251
href="#effects">transform</a></code>&rsquo;</span> Property</h2>
251252

@@ -287,7 +288,7 @@ <h2 id=transform-property><span class=secno>2 </span> The <span
287288
<tr>
288289
<td> <em>Percentages:</em>
289290

290-
<td> refer to the size of the element's box
291+
<td> refer to the size of the element's border box
291292

292293
<tr>
293294
<td> <em>Media:</em>
@@ -301,7 +302,7 @@ <h2 id=transform-property><span class=secno>2 </span> The <span
301302
</table>
302303
<!-- ======================================================================================================= -->
303304

304-
<h2 id=transform-origin-property><span class=secno>3 </span> The <span
305+
<h2 id=transform-origin-property><span class=secno>3. </span> The <span
305306
class=prop-name>&lsquo;<code class=property><a
306307
href="#transform-origin">transform-origin</a></code>&rsquo;</span>
307308
Property</h2>
@@ -316,11 +317,27 @@ <h2 id=transform-origin-property><span class=secno>3 </span> The <span
316317
applies the element's transform, then moves the element back to its
317318
original position.
318319

319-
<p> If only one value is specified, the second value is assumed to be
320-
&lsquo;<code class=property>center</code>&rsquo;. If at least one value is
321-
not a keyword, then the first value represents the horizontal position and
322-
the second represents the vertical position. Negative &lt;percentage&gt;
323-
and &lt;length&gt; values are allowed.
320+
<p>If only one value is specified, the second value is assumed to be
321+
&lsquo;<code class=property>center</code>&rsquo;. If two values are given
322+
and at least one value is not a keyword, then the first value represents
323+
the horizontal position (or offset) and the second represents the vertical
324+
position (or offset). <var>&lt;percentage&gt;</var> and
325+
<var>&lt;length&gt;</var> values here represent an offset of the transform
326+
origin from the top left corner of the element's border box.
327+
328+
<p>If three or four values are given, then each
329+
<var>&lt;percentage&gt;</var> or<var>&lt;length&gt;</var> represents an
330+
offset and must be preceded by a keyword, which specifies from which edge
331+
the offset is given. For example, &lsquo;<code class=css>transform-origin:
332+
bottom 10px right 20px</code>&rsquo; represents a &lsquo;<code
333+
class=css>10px</code>&rsquo; vertical offset up from the bottom edge and a
334+
&lsquo;<code class=css>20px</code>&rsquo; horizontal offset leftward from
335+
the right edge. If three values are given, the missing offset is assumed
336+
to be zero.
337+
338+
<p>Positive values represent an offset <em>inward</em> from the edge of the
339+
border box. Negative values represent an offset <em>outward</em> from the
340+
edge of the border box.
324341

325342
<table class=propdef>
326343
<tbody>
@@ -332,9 +349,12 @@ <h2 id=transform-origin-property><span class=secno>3 </span> The <span
332349
<tr>
333350
<td> <em>Value:</em>
334351

335-
<td> [ [ &lt;percentage&gt; | &lt;length&gt; | left | center | right ] [
336-
&lt;percentage&gt; | &lt;length&gt; | top | center | bottom ]? ] | [ [
337-
left | center | right ] || [ top | center | bottom ] ]
352+
<td> [ top | bottom ] |<br>
353+
[ &lt;percentage> | &lt;length&gt; | left | center | right ] [
354+
&lt;percentage> | &lt;length&gt; | top | center | bottom ]? |<br>
355+
[ center | [ left | right ] [ &lt;percentage> | &lt;length&gt; ]? ]
356+
&amp;&amp; [ center | [ top | bottom ] [ &lt;percentage> |
357+
&lt;length&gt; ]? ]<br>
338358

339359
<tr>
340360
<td> <em>Initial:</em>
@@ -354,7 +374,7 @@ <h2 id=transform-origin-property><span class=secno>3 </span> The <span
354374
<tr>
355375
<td> <em>Percentages:</em>
356376

357-
<td> refer to the size of the element's box
377+
<td> refer to the size of the element's border sbox
358378

359379
<tr>
360380
<td> <em>Media:</em>
@@ -368,7 +388,7 @@ <h2 id=transform-origin-property><span class=secno>3 </span> The <span
368388
</table>
369389
<!-- ======================================================================================================= -->
370390

371-
<h2 id=transform-functions><span class=secno>4 </span> The Transformation
391+
<h2 id=transform-functions><span class=secno>4. </span> The Transformation
372392
Functions</h2>
373393

374394
<p> The value of the <a class=prop-name href="#effects">transform</a>
@@ -460,7 +480,7 @@ <h2 id=transform-functions><span class=secno>4 </span> The Transformation
460480
of 0 is used for the Y angle (ie. no skew on the Y axis).
461481
</dl>
462482

463-
<h2 id=transform-values><span class=secno>5 </span> Transform Values and
483+
<h2 id=transform-values><span class=secno>5. </span> Transform Values and
464484
Lists</h2>
465485

466486
<p> The &lt;translation-value&gt; values are defined as [&lt;percentage&gt;
@@ -514,7 +534,7 @@ <h2 id=transform-values><span class=secno>5 </span> Transform Values and
514534
</div>
515535
<!-- ======================================================================================================= -->
516536

517-
<h2 id=animation><span class=secno>6 </span> Transitions and animations
537+
<h2 id=animation><span class=secno>6. </span> Transitions and animations
518538
between transform values</h2>
519539

520540
<p> When animating or transitioning the value of a transform property the
@@ -600,7 +620,7 @@ <h2 id=animation><span class=secno>6 </span> Transitions and animations
600620
from 1 to -1. At the time when the matrix is in such a state, the
601621
transformed element is not rendered.
602622

603-
<h2 id=matrix-decomposition><span class=secno>7 </span> Matrix
623+
<h2 id=matrix-decomposition><span class=secno>7. </span> Matrix
604624
decomposition for animation</h2>
605625

606626
<p> When interpolating between 2 matrices, each is decomposed into the
@@ -763,12 +783,12 @@ <h2 id=matrix-decomposition><span class=secno>7 </span> Matrix
763783
scale3d(scale[0], scale[1], scale[2])
764784
</pre>
765785

766-
<h2 id=dom-interfaces><span class=secno>8 </span> DOM Interfaces</h2>
786+
<h2 id=dom-interfaces><span class=secno>8. </span> DOM Interfaces</h2>
767787

768788
<p> This section describes the interfaces and functionality added to the
769789
DOM to support runtime access to the functionality described above.
770790

771-
<h3 id=cssmatrix-interface><span class=secno>8.1 </span> CSSMatrix</h3>
791+
<h3 id=cssmatrix-interface><span class=secno>8.1. </span> CSSMatrix</h3>
772792

773793
<dl>
774794
<dt> <b>Interface <i><a id=DOM-CSSMatrix
@@ -1133,7 +1153,7 @@ <h3 id=cssmatrix-interface><span class=secno>8.1 </span> CSSMatrix</h3>
11331153
matrix that is the result of applying the individual functions listed in
11341154
the <code><a href="#effects">transform</a></code> property.
11351155

1136-
<h2 id=references><span class=secno>9 </span>References</h2>
1156+
<h2 id=references><span class=secno>9. </span>References</h2>
11371157

11381158
<h3 class=no-num id=normative-references>Normative references</h3>
11391159
<!--begin-normative-->
@@ -1187,24 +1207,26 @@ <h2 class=no-num id=property-index>Property index</h2>
11871207

11881208
<td>no
11891209

1190-
<td>refer to the size of the element's box
1210+
<td>refer to the size of the element's border box
11911211

11921212
<td>visual
11931213

11941214
<tr valign=baseline>
11951215
<td><a class=property href="#transform-origin">transform-origin</a>
11961216

1197-
<td>[ [ &lt;percentage&gt; | &lt;length&gt; | left | center | right ] [
1198-
&lt;percentage&gt; | &lt;length&gt; | top | center | bottom ]? ] | [ [
1199-
left | center | right ] || [ top | center | bottom ] ]
1217+
<td>[ top | bottom ] | [ &lt;percentage> | &lt;length&gt; | left |
1218+
center | right ] [ &lt;percentage> | &lt;length&gt; | top | center |
1219+
bottom ]? | [ center | [ left | right ] [ &lt;percentage> |
1220+
&lt;length&gt; ]? ] &amp;&amp; [ center | [ top | bottom ] [
1221+
&lt;percentage> | &lt;length&gt; ]? ]
12001222

12011223
<td>50% 50%
12021224

12031225
<td>block-level and inline-level elements
12041226

12051227
<td>no
12061228

1207-
<td>refer to the size of the element's box
1229+
<td>refer to the size of the element's border sbox
12081230

12091231
<td>visual
12101232
</table>
@@ -1214,10 +1236,10 @@ <h2 class=no-num id=index>Index</h2>
12141236
<!--begin-index-->
12151237

12161238
<ul class=indexlist>
1217-
<li>transform, <a href="#effects" title=transform><strong>2</strong></a>
1239+
<li>transform, <a href="#effects" title=transform><strong>2.</strong></a>
12181240

12191241
<li>transform-origin, <a href="#transform-origin"
1220-
title=transform-origin><strong>3</strong></a>
1242+
title=transform-origin><strong>3.</strong></a>
12211243
</ul>
12221244
<!--end-index-->
12231245
</html>

css3-2d-transforms/Overview.src.html

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ <h2 id="transform-property">
209209
<em>Percentages:</em>
210210
</td>
211211
<td>
212-
refer to the size of the element's box
212+
refer to the size of the element's border box
213213
</td>
214214
</tr>
215215
<tr>
@@ -244,13 +244,30 @@ <h2 id="transform-origin-property">
244244
position.
245245
</p>
246246

247-
<p>
248-
If only one value is specified, the second value is assumed to be
249-
'center'. If at least one value is not a keyword, then the first value
250-
represents the horizontal position and the second represents the
251-
vertical position. Negative &lt;percentage&gt; and &lt;length&gt; values are
252-
allowed.
247+
<p>If only one value is specified, the second value is assumed to be
248+
'center'. If two values are given and at least one value is not a keyword,
249+
then the first value represents the horizontal position (or offset) and
250+
the second represents the vertical position (or
251+
offset). <var>&lt;percentage&gt;</var> and <var>&lt;length&gt;</var>
252+
values here represent an offset of the transform origin from the top left corner
253+
of the element's border box.
254+
</p>
255+
256+
<p>If three or four values are given, then
257+
each <var>&lt;percentage&gt;</var> or<var>&lt;length&gt;</var>
258+
represents an offset and must be preceded by a keyword,
259+
which specifies from which edge the offset is given. For example,
260+
''transform-origin: bottom 10px right 20px'' represents a
261+
''10px'' vertical offset up from the bottom edge and a
262+
''20px'' horizontal offset leftward from the right edge. If
263+
three values are given, the missing offset is assumed to be zero.
253264
</p>
265+
266+
<p>Positive values represent an offset <em>inward</em> from the edge of
267+
the border box. Negative values represent an offset
268+
<em>outward</em> from the edge of the border box.
269+
</p>
270+
254271
<table class="propdef">
255272
<tbody>
256273
<tr>
@@ -266,9 +283,9 @@ <h2 id="transform-origin-property">
266283
<em>Value:</em>
267284
</td>
268285
<td>
269-
[ [ &lt;percentage&gt; | &lt;length&gt; | left | center | right ] [
270-
&lt;percentage&gt; | &lt;length&gt; | top | center | bottom ]? ] | [ [ left |
271-
center | right ] || [ top | center | bottom ] ]
286+
[ top | bottom ] |<br>
287+
[ &lt;percentage> | &lt;length&gt; | left | center | right ] [ &lt;percentage> | &lt;length&gt; | top | center | bottom ]? |<br>
288+
[ center | [ left | right ] [ &lt;percentage> | &lt;length&gt; ]? ] &amp;&amp; [ center | [ top | bottom ] [ &lt;percentage> | &lt;length&gt; ]? ]<br>
272289
</td>
273290
</tr>
274291
<tr>
@@ -300,7 +317,7 @@ <h2 id="transform-origin-property">
300317
<em>Percentages:</em>
301318
</td>
302319
<td>
303-
refer to the size of the element's box
320+
refer to the size of the element's border sbox
304321
</td>
305322
</tr>
306323
<tr>

0 commit comments

Comments
 (0)