Skip to content

Commit 741aec2

Browse files
committed
[css-transforms-1][css-transforms-2][editorial] Fixed Bikeshed issues
1 parent ef15e99 commit 741aec2

File tree

2 files changed

+161
-152
lines changed

2 files changed

+161
-152
lines changed

css-transforms-1/Overview.bs

Lines changed: 67 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,9 @@ the <a>resolved value</a> is one <<matrix()>> function
406406
computed by the following algorithm:
407407

408408
<ol class="algorithm">
409-
1. Let <var>transform</var> be a 4x4 matrix initialized to the identity matrix. The elements <var ignore>m11</var>, <var ignore>m22</var>, <var ignore>m33</var> and <var ignore>m44</var> of <var>transform</var> must be set to ''1''; all other elements of <var>transform</var> must be set to ''0''.
410-
2. Post-multiply all <<transform-function>>s in <<transform-list>> to <var>transform</var>.
411-
3. Serialize <var>transform</var> to a <<matrix()>> function.
409+
1. Let <var>transform</var> be a 4x4 matrix initialized to the identity matrix. The elements <var ignore>m11</var>, <var ignore>m22</var>, <var ignore>m33</var> and <var ignore>m44</var> of <var>transform</var> must be set to ''1''; all other elements of <var>transform</var> must be set to ''0''.
410+
2. Post-multiply all <<transform-function>>s in <<transform-list>> to <var>transform</var>.
411+
3. Serialize <var>transform</var> to a <<matrix()>> function.
412412
</ol>
413413

414414
For other computed values, the <a>resolved value</a> is the <a>computed value</a>.
@@ -434,20 +434,20 @@ If only one value is specified, the second value is assumed to be <a value for=t
434434
If two or more values are defined and either no value is a keyword, or the only used keyword is <a value for=transform-origin>center</a>, then the first value represents the horizontal position (or offset) and the second represents the vertical position (or offset). A third value always represents the Z position (or offset) and must be of type <<length>>.
435435

436436
<dl dfn-for="transform-origin" dfn-type="value">
437-
: <<length-percentage>>
438-
:: A percentage for the horizontal offset is relative to the width of the [=reference box=]. A percentage for the vertical offset is relative to the 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=].
439-
: <<length>>
440-
:: 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=].
441-
: <dfn>top</dfn>
442-
:: Computes to ''0%'' for the vertical position.
443-
: <dfn>right</dfn>
444-
:: Computes to ''100%'' for the horizontal position.
445-
: <dfn>bottom</dfn>
446-
:: Computes to ''100%'' for the vertical position.
447-
: <dfn>left</dfn>
448-
:: Computes to ''0%'' for the horizontal position.
449-
: <dfn>center</dfn>
450-
:: 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.
437+
: <<length-percentage>>
438+
:: A percentage for the horizontal offset is relative to the width of the [=reference box=]. A percentage for the vertical offset is relative to the 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=].
439+
: <<length>>
440+
:: 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=].
441+
: <dfn>top</dfn>
442+
:: Computes to ''0%'' for the vertical position.
443+
: <dfn>right</dfn>
444+
:: Computes to ''100%'' for the horizontal position.
445+
: <dfn>bottom</dfn>
446+
:: Computes to ''100%'' for the vertical position.
447+
: <dfn>left</dfn>
448+
:: Computes to ''0%'' for the horizontal position.
449+
: <dfn>center</dfn>
450+
:: 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.
451451
</dl>
452452

453453
For SVG elements without associated CSS layout box the initial [=used value=] is ''0 0'' as if the user agent style sheet contained:
@@ -477,24 +477,24 @@ Animation type: discrete
477477
All transformations defined by the 'transform' and 'transform-origin' property are relative to the position and dimensions of the <dfn>reference box</dfn> of the element. The [=reference box=] is specified by one of the following:
478478

479479
<dl dfn-for=transform-box>
480-
: <dfn dfn-type=value>content-box</dfn>
481-
:: Uses the content box as reference box. The reference box of a table is the border box of its <a href="https://www.w3.org/TR/CSS21/tables.html#model">table wrapper box</a>, not its table box.
480+
: <dfn dfn-type=value>content-box</dfn>
481+
:: Uses the content box as reference box. The reference box of a table is the border box of its <a href="https://www.w3.org/TR/CSS21/tables.html#model">table wrapper box</a>, not its table box.
482482

483-
: <dfn dfn-type=value>border-box</dfn>
484-
:: Uses the border box as reference box. The reference box of a table is the border box of its <a href="https://www.w3.org/TR/CSS21/tables.html#model">table wrapper box</a>, not its table box.
483+
: <dfn dfn-type=value>border-box</dfn>
484+
:: Uses the border box as reference box. The reference box of a table is the border box of its <a href="https://www.w3.org/TR/CSS21/tables.html#model">table wrapper box</a>, not its table box.
485485

486-
: <dfn dfn-type=value>fill-box</dfn>
487-
:: Uses the <a>object bounding box</a> as reference box.
486+
: <dfn dfn-type=value>fill-box</dfn>
487+
:: Uses the <a>object bounding box</a> as reference box.
488488

489-
: <dfn dfn-type=value>stroke-box</dfn>
490-
:: Uses the <a>stroke bounding box</a> as reference box.
489+
: <dfn dfn-type=value>stroke-box</dfn>
490+
:: Uses the <a>stroke bounding box</a> as reference box.
491491

492-
: <dfn dfn-type=value>view-box</dfn>
493-
:: Uses the nearest <a href="https://www.w3.org/TR/SVG11/intro.html#TermSVGViewport">SVG viewport</a> as reference box.
492+
: <dfn dfn-type=value>view-box</dfn>
493+
:: Uses the nearest <a href="https://www.w3.org/TR/SVG11/intro.html#TermSVGViewport">SVG viewport</a> as reference box.
494494

495-
If a {{viewBox}} attribute is specified for the <a href="https://www.w3.org/TR/SVG11/intro.html#TermSVGViewport">SVG viewport</a> creating element:
496-
* The reference box is positioned at the origin of the coordinate system established by the {{viewBox}} attribute.
497-
* The dimension of the reference box is set to the <em>width</em> and <em>height</em> values of the {{viewBox}} attribute.
495+
If a {{viewBox}} attribute is specified for the <a href="https://www.w3.org/TR/SVG11/intro.html#TermSVGViewport">SVG viewport</a> creating element:
496+
* The reference box is positioned at the origin of the coordinate system established by the {{viewBox}} attribute.
497+
* The dimension of the reference box is set to the <em>width</em> and <em>height</em> values of the {{viewBox}} attribute.
498498
</dl>
499499

500500
For the SVG <{pattern}> element, the reference box gets defined by the <{pattern/patternUnits}> attribute [[!SVG2]].
@@ -912,41 +912,40 @@ A percentage for vertical translations is relative to the height of the [=refere
912912
----------------------
913913

914914
<dl dfn-for=transform>
915-
: <span class='prod'><dfn>matrix()</dfn> = matrix( <<number>>#{6} )</span>
916-
:: specifies a 2D transformation in the form of a <a href="#MatrixDefined">transformation matrix</a> of the six values a, b, c, d, e, f.
915+
: <span class='prod'><dfn>matrix()</dfn> = matrix( <<number>>#{6} )</span>
916+
:: specifies a 2D transformation in the form of a <a href="#MatrixDefined">transformation matrix</a> of the six values a, b, c, d, e, f.
917917

918-
: <span class='prod'><dfn>translate()</dfn> = translate( <<length-percentage>> , <<length-percentage>>? )</span>
919-
:: specifies a <a href="#TranslateDefined">2D translation</a> by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter. If <em>&lt;ty></em> is not provided, ty has zero as a value.
918+
: <span class='prod'><dfn>translate()</dfn> = translate( <<length-percentage>> , <<length-percentage>>? )</span>
919+
:: specifies a <a href="#TranslateDefined">2D translation</a> by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter. If <em>&lt;ty></em> is not provided, ty has zero as a value.
920920

921-
: <span class='prod'><dfn>translateX()</dfn> = translateX( <<length-percentage>> )</span>
922-
:: specifies a <a href="#TranslateDefined">translation</a> by the given amount in the X direction.
921+
: <span class='prod'><dfn>translateX()</dfn> = translateX( <<length-percentage>> )</span>
922+
:: specifies a <a href="#TranslateDefined">translation</a> by the given amount in the X direction.
923923

924-
: <span class='prod'><dfn>translateY()</dfn> = translateY( <<length-percentage>> )</span>
925-
:: specifies a <a href="#TranslateDefined">translation</a> by the given amount in the Y direction.
924+
: <span class='prod'><dfn>translateY()</dfn> = translateY( <<length-percentage>> )</span>
925+
:: specifies a <a href="#TranslateDefined">translation</a> by the given amount in the Y direction.
926926

927-
: <span class='prod'><dfn>scale()</dfn> = scale( <<number>> , <<number>>? )</span>
928-
:: specifies a <a href="#ScaleDefined">2D scale</a> operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it takes a value equal to the first. For example, scale(1, 1) would leave an element unchanged, while scale(2, 2) would cause it to appear twice as long in both the X and Y axes, or four times its typical geometric size.
927+
: <span class='prod'><dfn>scale()</dfn> = scale( <<number>> , <<number>>? )</span>
928+
:: specifies a <a href="#ScaleDefined">2D scale</a> operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it takes a value equal to the first. For example, scale(1, 1) would leave an element unchanged, while scale(2, 2) would cause it to appear twice as long in both the X and Y axes, or four times its typical geometric size.
929929

930-
: <span class='prod'><dfn>scaleX()</dfn> = scaleX( <<number>> )</span>
931-
:: specifies a <a href="#ScaleDefined">2D scale</a> operation using the [sx,1] scaling vector, where sx is given as the parameter.
930+
: <span class='prod'><dfn>scaleX()</dfn> = scaleX( <<number>> )</span>
931+
:: specifies a <a href="#ScaleDefined">2D scale</a> operation using the [sx,1] scaling vector, where sx is given as the parameter.
932932

933-
: <span class='prod'><dfn>scaleY()</dfn> = scaleY( <<number>> )</span>
934-
:: specifies a <a href="#ScaleDefined">2D scale</a> operation using the [1,sy] scaling vector, where sy is given as the parameter.
933+
: <span class='prod'><dfn>scaleY()</dfn> = scaleY( <<number>> )</span>
934+
:: specifies a <a href="#ScaleDefined">2D scale</a> operation using the [1,sy] scaling vector, where sy is given as the parameter.
935935

936-
: <span class='prod'><dfn>rotate()</dfn> = rotate( [ <<angle>> | <<zero>> ] )</span>
937-
:: specifies a <a href="#RotateDefined">2D rotation</a> by the angle specified in the parameter about the origin of the element, as defined by the 'transform-origin' property. For example, ''rotate(90deg)'' would cause elements to appear rotated one-quarter of a turn in the clockwise direction.
936+
: <span class='prod'><dfn>rotate()</dfn> = rotate( [ <<angle>> | <<zero>> ] )</span>
937+
:: specifies a <a href="#RotateDefined">2D rotation</a> by the angle specified in the parameter about the origin of the element, as defined by the 'transform-origin' property. For example, ''rotate(90deg)'' would cause elements to appear rotated one-quarter of a turn in the clockwise direction.
938938

939-
: <span class='prod'><dfn>skew()</dfn> = skew( [ <<angle>> | <<zero>> ] , [ <<angle>> | <<zero>> ]? )</span>
940-
:: specifies a <a href="#SkewDefined">2D skew</a> by [ax,ay] for X and Y. If the second parameter is not provided, it has a zero value.
939+
: <span class='prod'><dfn>skew()</dfn> = skew( [ <<angle>> | <<zero>> ] , [ <<angle>> | <<zero>> ]? )</span>
940+
:: specifies a <a href="#SkewDefined">2D skew</a> by [ax,ay] for X and Y. If the second parameter is not provided, it has a zero value.
941941

942-
Advisement: ''skew()'' exists for compatibility reasons, and should not be used in new content. Use ''skewX()'' or ''skewY()'' instead, noting that the behavior of ''skew()'' is different from multiplying ''skewX()'' with ''skewY()''.
942+
Advisement: ''skew()'' exists for compatibility reasons, and should not be used in new content. Use ''skewX()'' or ''skewY()'' instead, noting that the behavior of ''skew()'' is different from multiplying ''skewX()'' with ''skewY()''.
943943

944-
: <span class='prod'><dfn>skewX()</dfn> = skewX( [ <<angle>> | <<zero>> ] )</span>
945-
:: specifies a <a href="#SkewXDefined">2D skew transformation along the X axis</a> by the given angle.
946-
947-
: <span class='prod'><dfn>skewY()</dfn> = skewY( [ <<angle>> | <<zero>> ] )</span>
948-
:: specifies a <a href="#SkewYDefined">2D skew transformation along the Y axis</a> by the given angle.
944+
: <span class='prod'><dfn>skewX()</dfn> = skewX( [ <<angle>> | <<zero>> ] )</span>
945+
:: specifies a <a href="#SkewXDefined">2D skew transformation along the X axis</a> by the given angle.
949946

947+
: <span class='prod'><dfn>skewY()</dfn> = skewY( [ <<angle>> | <<zero>> ] )</span>
948+
:: specifies a <a href="#SkewYDefined">2D skew transformation along the Y axis</a> by the given angle.
950949
</dl>
951950

952951

@@ -956,12 +955,11 @@ Transform function primitives and derivatives {#transform-primitives}
956955
Some transform functions can be represented by more generic transform functions. These transform functions are called derived transform functions, and the generic transform functions are called primitive transform functions. Two-dimensional primitives and their derived transform functions are:
957956

958957
<dl>
959-
<dt id="translate-primitive">''translate()''
960-
<dd>for <<translateX()>>, <<translateY()>> and <<translate()>>.
961-
962-
<dt id="scale-primitive">''scale()''
963-
<dd>for <<scaleX()>>, <<scaleY()>> and <<scale()>>.
958+
<dt id="translate-primitive">''translate()''
959+
<dd>for <<translateX()>>, <<translateY()>> and <<translate()>>.
964960

961+
<dt id="scale-primitive">''scale()''
962+
<dd>for <<scaleX()>>, <<scaleY()>> and <<scale()>>.
965963
</dl>
966964

967965

@@ -1416,7 +1414,7 @@ One translation unit on a matrix is equivalent to 1 pixel in the local coordinat
14161414

14171415
<img src="images/rotate3dmatrix.png" alt="\begin{bmatrix} 1 - 2 \cdot (y^2 + z^2) \cdot sq & 2 \cdot (x \cdot y \cdot sq - z \cdot sc) & 2 \cdot (x \cdot z \cdot sq + y \cdot sc) & 0 \\ 2 \cdot (x \cdot y \cdot sq + z \cdot sc) & 1 - 2 \cdot (x^2 + z^2) \cdot sq & 2 \cdot (y \cdot z \cdot sq - x \cdot sc) & 0 \\ 2 \cdot (x \cdot z \cdot sq - y \cdot sc) & 2 \cdot (y \cdot z \cdot sq + x \cdot sc) & 1 - 2 \cdot (x^2 + y^2) \cdot sq & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}" width="647" height="106">
14181416

1419-
where:
1417+
where:
14201418

14211419
<img src="images/rotate3dvariables.png" alt="\newline sc = \sin (\alpha/2) \cdot \cos (\alpha/2) \newline sq = \sin^2 (\alpha/2)" width="221" height="50">
14221420

@@ -1440,12 +1438,17 @@ One translation unit on a matrix is equivalent to 1 pixel in the local coordinat
14401438

14411439
</ul>
14421440

1443-
# Privacy and Security Considerations # {#priv-sec}
1441+
# Privacy Considerations # {#privacy}
1442+
14441443
UAs must implement transform operations in a way attackers can not infer information and mount a timing attack.
14451444

14461445
A timing attack is a method of obtaining information about content that is otherwise protected, based on studying the amount of time it takes for an operation to occur.
14471446

1448-
At this point there are no information about potential privacy or security concerns specific to this specification.
1447+
At this point there are no information about potential privacy concerns specific to this specification.
1448+
1449+
# Security Considerations # {#security}
1450+
1451+
At this point there are no information about potential security concerns specific to this specification.
14491452

14501453
<h2 class="no-num" id="changes">Changes</h2>
14511454

@@ -1455,6 +1458,7 @@ At this point there are no information about potential privacy or security conce
14551458
* Simplified grammar of transform functions. (No normative impact.)
14561459
* Remove animation support of 'transform' from <a element>animate</a> and <a element>set</a> elements.
14571460
* State that transforms do not transform backgrounds that are propagated to the canvas, and clarify some other interactions with background propagation.
1461+
* Split privacy and security section.
14581462
* Editorial changes.
14591463

14601464
<h3 class="no-num" id="WD20181130">Since the <a href="https://www.w3.org/TR/2018/WD-css-transforms-1-20181130/">30 November 2018 Working Draft</a></h3>
@@ -1467,7 +1471,7 @@ At this point there are no information about potential privacy or security conce
14671471
</h3>
14681472

14691473
* Remove specification text that makes <a element-attr for=pattern>patternTransform</a>, <a element-attr for=linearGradient>gradientTransform</a> presentation attributes representing the 'transform' property. That is going to get specified by SVG 2 [[SVG2]].
1470-
* Added <a href="#priv-sec">privacy and security</a> section.
1474+
* Added privacy and security section.
14711475
* Use [[SVG2]] definitions for <a>transformable elements</a>.
14721476
* Added special syntax for <a element-attr for>transform</a>, <{linearGradient/gradientTransform}> and <{pattern/patternTransform}> attributes.
14731477
* Clarify multiplication order by using terms <a>post-multiply</a> and <a>pre-multiply</a>.

0 commit comments

Comments
 (0)