Skip to content

Commit 689251d

Browse files
committed
1 parent 78a48d0 commit 689251d

3 files changed

Lines changed: 53 additions & 45 deletions

File tree

css3-images/Overview.html

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616

1717
<h1>CSS Image Values and Replaced Content Module Level 3</h1>
1818

19-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 1 March 2012</h2>
19+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 13 March 2012</h2>
2020

2121
<dl>
2222
<dt>This Version:
2323

2424
<dd><a
2525
href="http://dev.w3.org/csswg/css3-images/">http://dev.w3.org/csswg/css3-images/</a>
26-
<!-- <dd><a href="http://www.w3.org/TR/2012/ED-css3-images-20120301/">http://www.w3.org/TR/2012/WD-css3-images-20120301/</a>-->
26+
<!-- <dd><a href="http://www.w3.org/TR/2012/ED-css3-images-20120313/">http://www.w3.org/TR/2012/WD-css3-images-20120313/</a>-->
2727

2828

2929
<dt>Latest Version:
@@ -625,6 +625,7 @@ <h4 id=image-fallbacks><span class=secno>3.2.2. </span> Image Fallbacks</h4>
625625

626626
<pre>background-image: image('cat_meme.gif#frame=5', 'lolcat.png');</pre>
627627
</div>
628+
<!-- XXX SVG fragment example with spriting / fallbacks -->
628629

629630
<h4 id=solid-color-images><span class=secno>3.2.3. </span> Solid-color
630631
Images</h4>
@@ -1099,18 +1100,20 @@ <h4 class=no-toc id=linear-gradient-syntax><span class=secno>4.1.1. </span>
10991100
<p>The first argument to the function specifies the <dfn
11001101
id=gradient-line>gradient line</dfn>, which gives the gradient a direction
11011102
and determines how color-stops are positioned. It may be omitted; if so,
1102-
it defaults to "to bottom".
1103+
it defaults to &lsquo;<code class=css>to bottom</code>&rsquo;.
11031104

11041105
<p>The <a href="#gradient-line"><i title="gradient line">gradient
11051106
line's</i></a> direction may be specified in two ways:
11061107

11071108
<dl>
1108-
<dt>by angle
1109+
<dt>using angles
11091110

1110-
<dd>For the purpose of this argument, 0deg points upward, and positive
1111-
angles represent clockwise rotation, so 90deg point toward the right.
1111+
<dd>For the purpose of this argument, &lsquo;<code
1112+
class=css>0deg</code>&rsquo; points upward, and positive angles represent
1113+
clockwise rotation, so &lsquo;<code class=css>90deg</code>&rsquo; point
1114+
toward the right.
11121115

1113-
<dt>by keyword
1116+
<dt>using keywords
11141117

11151118
<dd>
11161119
<p>If the argument is &lsquo;<code class=css>to top</code>&rsquo;,
@@ -1133,11 +1136,11 @@ <h4 class=no-toc id=linear-gradient-syntax><span class=secno>4.1.1. </span>
11331136

11341137
<p>Starting from the center of the <a href="#gradient-box"><i>gradient
11351138
box</i></a>, extend a line at the specified angle in both directions. The
1136-
ending-point is the point on the <a href="#gradient-line"><i>gradient
1139+
ending point is the point on the <a href="#gradient-line"><i>gradient
11371140
line</i></a> where a line drawn perpendicular to the <a
11381141
href="#gradient-line"><i>gradient line</i></a> would intersect the corner
11391142
of the <a href="#gradient-box"><i>gradient box</i></a> in the specified
1140-
direction. The starting-point is determined identically, but in the
1143+
direction. The starting point is determined identically, but in the
11411144
opposite direction.
11421145

11431146
<p class=note>It is expected that the next level of this module will
@@ -1146,37 +1149,37 @@ <h4 class=no-toc id=linear-gradient-syntax><span class=secno>4.1.1. </span>
11461149

11471150
<div class=example>
11481151
<div style="overflow: hidden"> <img
1149-
alt="[An image showing a box with a background shading gradually from white in the bottom-left corner to black in the top-right corner. There is a line, illustrating the gradient line, angled at 45 degrees and passing through the center of the box. The starting-point and ending-point of the gradient line are indicated by the intersection of the gradient line with two additional lines that pass through the bottom-left and top-right corners of the box.]"
1152+
alt="[An image showing a box with a background shading gradually from white in the bottom-left corner to black in the top-right corner. There is a line, illustrating the gradient line, angled at 45 degrees and passing through the center of the box. The starting point and ending point of the gradient line are indicated by the intersection of the gradient line with two additional lines that pass through the bottom-left and top-right corners of the box.]"
11501153
src=gradient-diagram.png style="float: right; margin-left: 1em;">
11511154
<p>This example illustrates visually how to calculate the <a
11521155
href="#gradient-line"><i>gradient line</i></a> from the rules above.
1153-
This shows the starting and ending-point of the <a
1156+
This shows the starting and ending point of the <a
11541157
href="#gradient-line"><i>gradient line</i></a>, along with the actual
11551158
gradient, produced by an element with &lsquo;<code class=css>background:
11561159
linear-gradient(45deg, white, black);</code>&rsquo;.</p>
11571160

1158-
<p>Notice how, though the starting-point and ending-point are outside of
1161+
<p>Notice how, though the starting point and ending point are outside of
11591162
the box, they're positioned precisely right so that the gradient is pure
11601163
white <em>exactly</em> at the corner, and pure black <em>exactly</em> at
11611164
the opposite corner. That's intentional, and will always be true for
11621165
linear gradients.</p>
11631166
</div>
11641167
</div>
11651168

1166-
<p>The gradient's color stops are typically placed between the
1167-
starting-point and ending-point on the <a
1168-
href="#gradient-line"><i>gradient line</i></a>, but this isn't required -
1169-
the <a href="#gradient-line"><i>gradient line</i></a> extends infinitely
1170-
in both directions. The starting-point and ending-point are merely
1171-
arbitrary location markers - the starting-point defines where 0%, 0px, etc
1172-
are located when specifying color-stops, and the ending-point defines
1173-
where 100% is located. Color-stops are allowed to have positions before 0%
1174-
or after 100%.
1175-
1176-
<p>The color of the gradient at any point is determined by first finding
1177-
the unique line passing through that point that is perpendicular to the <a
1178-
href="#gradient-line"><i>gradient line</i></a>. The point's color is then
1179-
the color of the <a href="#gradient-line"><i>gradient line</i></a> at the
1169+
<p>The gradient's color stops are typically placed between the starting
1170+
point and ending point on the <a href="#gradient-line"><i>gradient
1171+
line</i></a>, but this isn't required - the <a
1172+
href="#gradient-line"><i>gradient line</i></a> extends infinitely in both
1173+
directions. The starting point and ending point are merely arbitrary
1174+
location markers - the starting point defines where 0%, 0px, etc are
1175+
located when specifying color-stops, and the ending point defines where
1176+
100% is located. Color-stops are allowed to have positions before 0% or
1177+
after 100%.
1178+
1179+
<p>The color of the gradient at any point is determined by finding the
1180+
unique line passing through that point that is perpendicular to the <a
1181+
href="#gradient-line"><i>gradient line</i></a>. The point's color is the
1182+
color of the <a href="#gradient-line"><i>gradient line</i></a> at the
11801183
point where this line intersects it.</p>
11811184
<!-- ====================================================================== -->
11821185

@@ -1647,9 +1650,9 @@ <h3 id=color-stop-syntax><span class=secno>4.4. </span> Gradient
16471650
href="#gradient-line"><i>gradient line</i></a> at the beginning of the
16481651
rule. Color-stops must be specified in order. Percentages refer to the
16491652
length of the gradient line, with 0% being at the starting point and 100%
1650-
being at the ending point. Lengths are measured from the starting-point in
1651-
the direction of the ending-point. Color-stops are usually placed between
1652-
the starting-point and ending-point, but that's not required; the gradient
1653+
being at the ending point. Lengths are measured from the starting point in
1654+
the direction of the ending point. Color-stops are usually placed between
1655+
the starting point and ending point, but that's not required; the gradient
16531656
line extends infinitely in both directions, and a color-stop can be placed
16541657
at any position on the line.
16551658

css3-images/Overview.src.html

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -580,51 +580,51 @@ <h4 class='no-toc' id='linear-gradient-syntax'>
580580

581581
<p>The first argument to the function specifies the <dfn>gradient line</dfn>,
582582
which gives the gradient a direction and determines how color-stops are
583-
positioned. It may be omitted; if so, it defaults to "to bottom".</p>
583+
positioned. It may be omitted; if so, it defaults to ''to bottom''.</p>
584584

585585
<p>The <i title="gradient line">gradient line's</i> direction may be specified in two ways:</p>
586586

587587
<dl>
588-
<dt>by angle</dt>
589-
<dd>For the purpose of this argument, 0deg points upward, and positive angles represent clockwise rotation, so 90deg point toward the right.</dd>
588+
<dt>using angles</dt>
589+
<dd>For the purpose of this argument, ''0deg'' points upward, and positive angles represent clockwise rotation, so ''90deg'' point toward the right.</dd>
590590

591-
<dt>by keyword</dt>
591+
<dt>using keywords</dt>
592592
<dd>
593593
<p>If the argument is ''to top'', ''to right'', ''to bottom'', or ''to left'', the angle of the <i>gradient line</i> is ''0deg'', ''90deg'', ''180deg'', or ''270deg'', respectively.</p>
594594

595595
<p>If the argument instead specifies a corner of the box such as ''to top left'', the gradient line must be angled such that it points into the same quadrant as the specified corner, and a line drawn perpendicular to the <i>gradient line</i> through the center of the <i>gradient box</i> intersects the two neighboring corners.</p>
596596
</dd>
597597
</dl>
598598

599-
<p>Starting from the center of the <i>gradient box</i>, extend a line at the specified angle in both directions. The ending-point is the point on the <i>gradient line</i> where a line drawn perpendicular to the <i>gradient line</i> would intersect the corner of the <i>gradient box</i> in the specified direction. The starting-point is determined identically, but in the opposite direction.</p>
599+
<p>Starting from the center of the <i>gradient box</i>, extend a line at the specified angle in both directions. The ending point is the point on the <i>gradient line</i> where a line drawn perpendicular to the <i>gradient line</i> would intersect the corner of the <i>gradient box</i> in the specified direction. The starting point is determined identically, but in the opposite direction.</p>
600600

601601
<p class='note'>It is expected that the next level of this module will provide the ability to define the gradient's direction relative to the current text direction and writing-mode.</p>
602602

603603
<div class=example>
604604
<div style="overflow: hidden">
605-
<img style="float: right; margin-left: 1em;" src='gradient-diagram.png' alt="[An image showing a box with a background shading gradually from white in the bottom-left corner to black in the top-right corner. There is a line, illustrating the gradient line, angled at 45 degrees and passing through the center of the box. The starting-point and ending-point of the gradient line are indicated by the intersection of the gradient line with two additional lines that pass through the bottom-left and top-right corners of the box.]">
605+
<img style="float: right; margin-left: 1em;" src='gradient-diagram.png' alt="[An image showing a box with a background shading gradually from white in the bottom-left corner to black in the top-right corner. There is a line, illustrating the gradient line, angled at 45 degrees and passing through the center of the box. The starting point and ending point of the gradient line are indicated by the intersection of the gradient line with two additional lines that pass through the bottom-left and top-right corners of the box.]">
606606
<p>This example illustrates visually how to calculate the
607607
<i>gradient line</i> from the rules above. This shows the starting
608-
and ending-point of the <i>gradient line</i>, along with the actual
608+
and ending point of the <i>gradient line</i>, along with the actual
609609
gradient, produced by an element with
610610
''background: linear-gradient(45deg, white, black);''.</p>
611-
<p>Notice how, though the starting-point and ending-point are outside
611+
<p>Notice how, though the starting point and ending point are outside
612612
of the box, they're positioned precisely right so that the gradient
613613
is pure white <em>exactly</em> at the corner, and pure black
614614
<em>exactly</em> at the opposite corner. That's intentional, and
615615
will always be true for linear gradients.</p>
616616
</div>
617617
</div>
618618

619-
<p>The gradient's color stops are typically placed between the starting-point
620-
and ending-point on the <i>gradient line</i>, but this isn't required - the
621-
<i>gradient line</i> extends infinitely in both directions. The starting-point
622-
and ending-point are merely arbitrary location markers - the starting-point
619+
<p>The gradient's color stops are typically placed between the starting point
620+
and ending point on the <i>gradient line</i>, but this isn't required - the
621+
<i>gradient line</i> extends infinitely in both directions. The starting point
622+
and ending point are merely arbitrary location markers - the starting point
623623
defines where 0%, 0px, etc are located when specifying color-stops, and
624-
the ending-point defines where 100% is located. Color-stops are allowed
624+
the ending point defines where 100% is located. Color-stops are allowed
625625
to have positions before 0% or after 100%.</p>
626626

627-
<p>The color of the gradient at any point is determined by first finding the unique line passing through that point that is perpendicular to the <i>gradient line</i>. The point's color is then the color of the <i>gradient line</i> at the point where this line intersects it.</p>
627+
<p>The color of the gradient at any point is determined by finding the unique line passing through that point that is perpendicular to the <i>gradient line</i>. The point's color is the color of the <i>gradient line</i> at the point where this line intersects it.</p>
628628

629629
<!-- ====================================================================== -->
630630

@@ -939,8 +939,8 @@ <h3 id='color-stop-syntax'>
939939
at the beginning of the rule. Color-stops must be specified in order.
940940
Percentages refer to the length of the gradient line, with 0% being at the
941941
starting point and 100% being at the ending point. Lengths are measured
942-
from the starting-point in the direction of the ending-point. Color-stops
943-
are usually placed between the starting-point and ending-point, but that's
942+
from the starting point in the direction of the ending point. Color-stops
943+
are usually placed between the starting point and ending point, but that's
944944
not required; the gradient line extends infinitely in both directions, and
945945
a color-stop can be placed at any position on the line.</p>
946946

css3-images/issues-lc-2012.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,3 +310,8 @@ From: David Baron
310310
Comment: http://lists.w3.org/Archives/Public/www-style/2012Mar/0337.html
311311
Open.
312312
----
313+
Issue 40.
314+
Summary: Editorial comments on linear-gradient()
315+
From: David Baron
316+
Comment: http://lists.w3.org/Archives/Public/www-style/2012Mar/0338.html
317+
Open.

0 commit comments

Comments
 (0)