Skip to content

Commit 813717c

Browse files
committed
Changed behavior for transforms on patterns, gradients and other resources.
1 parent da47671 commit 813717c

3 files changed

Lines changed: 59 additions & 120 deletions

File tree

css3-transforms/ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2012-07-20 dschulze@adobe.com
2+
Changed behavior for transforms on patterns, gradients and other resources.
3+
The user space for transformations does not depend on the ‘patternUnit’,
4+
‘gradientUnit’ and ‘maskUnit’ attributes. Theses attributes just affect 'x',
5+
'y', 'width' and 'height'.
6+
Added an issue if percentage should be dependent on viewport or the bounding
7+
box of the referencin object.
8+
19
2012-07-12 simon.fraser@apple.com
210
Fix https://www.w3.org/Bugs/Public/show_bug.cgi?id=17431 by making the wording
311
about the rendering effects of 3D transforms not CSS-specific.

css3-transforms/Overview.html

Lines changed: 31 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@
3939

4040
<h1>CSS Transforms</h1>
4141

42-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 12 July 2012</h2>
42+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 20 July 2012</h2>
4343

4444
<dl>
4545
<dt>This version:
4646

4747
<dd> <a
48-
href="http://www.w3.org/TR/2012/ED-css3-transforms-20120712/">http://dev.w3.org/csswg/css3-transforms/</a>
49-
<!--http://www.w3.org/TR/2012/WD-css3-transforms-20120712/-->
48+
href="http://www.w3.org/TR/2012/ED-css3-transforms-20120720/">http://dev.w3.org/csswg/css3-transforms/</a>
49+
<!--http://www.w3.org/TR/2012/WD-css3-transforms-20120720/-->
5050

5151
<dt>Latest version:
5252

@@ -2040,77 +2040,31 @@ <h3 id=svg-three-dimensional-functions><span class=secno>13.5. </span>SVG
20402040
<h3 id=svg-user-coordinate-space><span class=secno>13.6. </span> User
20412041
coordinate space</h3>
20422042

2043-
<p> If the ‘<code class=property>patternUnit</code>’ attribute of the
2044-
SVG ‘<code class=property>pattern</code>’ element is ‘<code
2045-
class=css>userSpaceOnUse</code>’, the ‘<a href="#effects"><code
2046-
class=property>transform</code></a>’ property and the ‘<code
2047-
class=property>patternTransform</code>’ attribute represents values in
2048-
the current user coordinate system in place at the time when the ‘<code
2049-
class=property>pattern</code>’ element is referenced (i.e., the user
2050-
coordinate system for the element referencing the ‘<code
2051-
class=property>pattern</code>’ element via a ‘<code
2052-
class=property>fill</code>’ or ‘<code class=property>stroke</code>
2053-
property).<br>
2054-
If the ‘<code class=property>patternUnit</code>’ attribute is set to
2055-
<code class=css>objectBoundingBox</code>’ the user coordinate system
2056-
for the ‘<a href="#effects"><code class=property>transform</code></a>
2057-
property and the ‘<code class=property>patternTransform</code>
2058-
attribute is established using the <a class=term
2059-
href="#bounding-box">bounding box</a> of the element to which the pattern
2060-
is applied (see <a
2061-
href="http://www.w3.org/TR/SVG/coords.html#ObjectBoundingBoxUnits">Object
2062-
bounding box units</a> <a href="#SVG11"
2063-
rel=biblioentry>[SVG11]<!--{{SVG11}}--></a>).
2064-
2065-
<p> If the ‘<code class=property>gradientUnit</code>’ attribute of the
2066-
SVG ‘<code class=property>linearGradient</code>’ element and the
2067-
<code class=property>radialGradient</code>’ element is ‘<code
2068-
class=css>userSpaceOnUse</code>’, the ‘<a href="#effects"><code
2069-
class=property>transform</code></a>’ property and the ‘<code
2070-
class=property>gradientTransform</code>’ attribute represents values in
2071-
the current user coordinate system in place at the time when the
2072-
‘gradient’ element is referenced (i.e., the user coordinate system for
2073-
the element referencing ‘<code class=property>linearGradient</code>
2074-
element or ‘<code class=property>radialGradient</code>’ element via a
2075-
<code class=property>fill</code>’ or ‘<code
2076-
class=property>stroke</code>’ property).<br>
2077-
If the ‘<code class=property>gradientUnit</code>’ attribute is set to
2078-
<code class=css>objectBoundingBox</code>’ the user coordinate system
2079-
for the ‘<a href="#effects"><code class=property>transform</code></a>
2080-
property and the ‘<code class=property>patternTransform</code>
2081-
attribute is established using the <a class=term
2082-
href="#bounding-box">bounding box</a> of the element to which the gradient
2083-
is applied (see <a
2084-
href="http://www.w3.org/TR/SVG/coords.html#ObjectBoundingBoxUnits">Object
2085-
bounding box units</a> <a href="#SVG11"
2086-
rel=biblioentry>[SVG11]<!--{{SVG11}}--></a>).
2087-
2088-
<p> If the ‘<code class=property>maskUnit</code>’ attribute of the SVG
2089-
<code class=property>mask</code>’ element is ‘<code
2090-
class=css>userSpaceOnUse</code>’, the ‘<a href="#effects"><code
2091-
class=property>transform</code></a>’ presentation attribute represents
2092-
values in the current user coordinate system in place at the time when the
2093-
<code class=property>mask</code>’ element is referenced (i.e., the
2094-
user coordinate system for the element referencing the ‘<code
2095-
class=property>mask</code>’ element via the ‘<code
2096-
class=property>mask</code>’ property).<br>
2097-
If the ‘<code class=property>maskUnit</code>’ attribute is set to
2098-
<code class=css>objectBoundingBox</code>’ the user coordinate system
2099-
for the ‘<a href="#effects"><code class=property>transform</code></a>
2100-
presentation attribute is established using the <a class=term
2101-
href="#bounding-box">bounding box</a> of the element to which the mask is
2102-
applied (see <a
2103-
href="http://www.w3.org/TR/SVG/coords.html#ObjectBoundingBoxUnits">Object
2104-
bounding box units</a> <a href="#SVG11"
2105-
rel=biblioentry>[SVG11]<!--{{SVG11}}--></a>).
2106-
2107-
<p> For the ‘<code class=property>clipPath</code>’ element the ‘<a
2108-
href="#effects"><code class=property>transform</code></a>’ presentation
2109-
attribute represents values in the current user coordinate system in place
2110-
at the time when the ‘<code class=property>clipPath</code>’ element is
2111-
referenced (i.e., the user coordinate system for the element referencing
2112-
the ‘<code class=property>clipPath</code>’ element via the ‘<code
2113-
class=property>clip-path</code>’ property).
2043+
<p> For the ‘<code class=property>pattern</code>’, ‘<code
2044+
class=property>linearGradient</code>’, ‘<code
2045+
class=property>radialGradient</code>’, ‘<code
2046+
class=property>mask</code>’ and ‘<code
2047+
class=property>clipPath</code>’ elements the ‘<a href="#effects"><code
2048+
class=property>transform</code></a>’, ‘<code
2049+
class=property>patternTransform</code>’, ‘<code
2050+
class=property>gradientTransform</code>’ presentation attributes
2051+
represents values in the current user coordinate system in place at the
2052+
time when these elements are referenced (i.e., the user coordinate system
2053+
for the element referencing the ‘<code class=property>pattern</code>
2054+
element via a ‘<code class=property>fill</code>’ or ‘<code
2055+
class=property>stroke</code>’ property).
2056+
2057+
<p class=issue> Should percentage values on transforms be relative the
2058+
viewport (the case for all other attributes on the mentioned attributes),
2059+
or should the be reletive the referencing objects bounding box (like it is
2060+
for all other transformable elements). The later choice seems to be more
2061+
consistent within CSS Transforms.
2062+
2063+
<p> In particualar the ‘<code class=property>patternUnit</code>’,
2064+
<code class=property>gradientUnit</code>’ and ‘<code
2065+
class=property>maskUnit</code>’ attributes don't affect the user
2066+
coordinate system used for transformations <a href="#SVG11"
2067+
rel=biblioentry>[SVG11]<!--{{SVG11}}--></a>.
21142068

21152069
<p> For all other <a class=term href="#transformable-element">transformable
21162070
elements</a> the ‘<a href="#effects"><code
@@ -2121,6 +2075,9 @@ <h3 id=svg-user-coordinate-space><span class=secno>13.6. </span> User
21212075
to the element's <a class=term href="#bounding-box">bounding box</a>.
21222076

21232077
<div class=example>
2078+
<p class=issue> The result in the example below depends on the decision
2079+
made on the previous issue.</p>
2080+
21242081
<p> The ‘<a href="#transform-origin"><code
21252082
class=property>transform-origin</code></a>’ property on the pattern in
21262083
the following example specifies a ‘<code class=css>50%</code>

css3-transforms/Transforms.src.html

Lines changed: 20 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,57 +1902,27 @@ <h3 id="svg-three-dimensional-functions">SVG and 3D transform functions</h3>
19021902
<h3 id="svg-user-coordinate-space">
19031903
User coordinate space
19041904
</h3>
1905-
1905+
19061906
<p>
1907-
If the 'patternUnit' attribute of the SVG 'pattern' element is ''userSpaceOnUse'',
1908-
the 'transform' property and the 'patternTransform' attribute represents values in
1909-
the current user coordinate system in place at the time when the 'pattern' element
1910-
is referenced (i.e., the user coordinate system for the element referencing the
1911-
'pattern' element via a 'fill' or 'stroke' property).<br>
1912-
If the 'patternUnit' attribute is set to ''objectBoundingBox'' the user coordinate
1913-
system for the 'transform' property and the 'patternTransform' attribute is
1914-
established using the <span class="term">bounding box</span> of the element to which
1915-
the pattern is applied (see <a
1916-
href="http://www.w3.org/TR/SVG/coords.html#ObjectBoundingBoxUnits">Object
1917-
bounding box units</a> [[SVG11]]).
1918-
</p>
1919-
1920-
<p>
1921-
If the 'gradientUnit' attribute of the SVG 'linearGradient' element and the
1922-
'radialGradient' element is ''userSpaceOnUse'', the 'transform' property and
1923-
the 'gradientTransform' attribute represents values in the current user coordinate
1924-
system in place at the time when the ‘gradient’ element is referenced (i.e., the user
1925-
coordinate system for the element referencing 'linearGradient' element or
1926-
'radialGradient' element via a 'fill' or 'stroke' property).<br>
1927-
If the 'gradientUnit' attribute is set to ''objectBoundingBox'' the user coordinate
1928-
system for the 'transform' property and the 'patternTransform' attribute is
1929-
established using the <span class="term">bounding box</span> of the element to which
1930-
the gradient is applied (see <a
1931-
href="http://www.w3.org/TR/SVG/coords.html#ObjectBoundingBoxUnits">Object
1932-
bounding box units</a> [[SVG11]]).
1907+
For the 'pattern', 'linearGradient', 'radialGradient', 'mask' and 'clipPath'
1908+
elements the 'transform', 'patternTransform', 'gradientTransform' presentation
1909+
attributes represents values in the current user coordinate system in place at the
1910+
time when these elements are referenced (i.e., the user coordinate system for the
1911+
element referencing the 'pattern' element via a 'fill' or 'stroke' property).
19331912
</p>
1934-
1935-
<p>
1936-
If the 'maskUnit' attribute of the SVG 'mask' element is ''userSpaceOnUse'', the
1937-
'transform' presentation attribute represents values in the current user coordinate
1938-
system in place at the time when the 'mask' element is referenced (i.e., the user
1939-
coordinate system for the element referencing the 'mask' element via the 'mask'
1940-
property).<br>
1941-
If the 'maskUnit' attribute is set to ''objectBoundingBox'' the user
1942-
coordinate system for the 'transform' presentation attribute is established using
1943-
the <span class="term">bounding box</span> of the element to which the mask is
1944-
applied (see <a
1945-
href="http://www.w3.org/TR/SVG/coords.html#ObjectBoundingBoxUnits">Object bounding
1946-
box units</a> [[SVG11]]).
1913+
1914+
<p class="issue">
1915+
Should percentage values on transforms be relative the viewport (the case for all
1916+
other attributes on the mentioned attributes), or should the be reletive the
1917+
referencing objects bounding box (like it is for all other transformable elements).
1918+
The later choice seems to be more consistent within CSS Transforms.
19471919
</p>
1948-
1920+
19491921
<p>
1950-
For the 'clipPath' element the 'transform' presentation attribute represents values
1951-
in the current user coordinate system in place at the time when the 'clipPath'
1952-
element is referenced (i.e., the user coordinate system for the element referencing
1953-
the 'clipPath' element via the 'clip-path' property).
1922+
In particualar the 'patternUnit', 'gradientUnit' and 'maskUnit' attributes
1923+
don't affect the user coordinate system used for transformations [[SVG11]].
19541924
</p>
1955-
1925+
19561926
<p>
19571927
For all other <span class="term">transformable elements</span> the
19581928
'transform' presentation attribute represents values in the current user coordinate
@@ -1961,6 +1931,10 @@ <h3 id="svg-user-coordinate-space">
19611931
</p>
19621932

19631933
<div class="example">
1934+
<p class="issue">
1935+
The result in the example below depends on the decision made on the previous issue.
1936+
</p>
1937+
19641938
<p>
19651939
The 'transform-origin' property on the pattern in the following example specifies
19661940
a ''50%'' translation of the origin in the horizontal and vertical dimension. The

0 commit comments

Comments
 (0)