Skip to content

Commit a895646

Browse files
committed
Editorial tweak to magic corner linear-gradient() definition.
--HG-- extra : rebase_source : 5ecd5155ae257bcc36e4aeb70e8eccd41d5c9200
1 parent eba402f commit a895646

2 files changed

Lines changed: 17 additions & 12 deletions

File tree

css3-images/Overview.html

Lines changed: 11 additions & 10 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 29 March 2012</h2>
19+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 24 April 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-20120329/">http://www.w3.org/TR/2012/WD-css3-images-20120329/</a>-->
26+
<!-- <dd><a href="http://www.w3.org/TR/2012/ED-css3-images-20120424/">http://www.w3.org/TR/2012/WD-css3-images-20120424/</a>-->
2727

2828

2929
<dt>Latest Version:
@@ -967,13 +967,14 @@ <h4 class=no-toc id=linear-gradient-syntax><span class=secno>4.1.1. </span>
967967
class=css>180deg</code>&rsquo;, or &lsquo;<code
968968
class=css>270deg</code>&rsquo;, respectively.</p>
969969

970-
<p>If the argument instead specifies a corner of the box such as
971-
&lsquo;<code class=css>to top left</code>&rsquo;, the gradient line must
972-
be angled such that it points into the same quadrant as the specified
973-
corner, and a line drawn perpendicular to the <a
974-
href="#gradient-line"><i>gradient line</i></a> through the center of the
975-
<a href="#gradient-box"><i>gradient box</i></a> intersects the two
976-
neighboring corners.</p>
970+
<p> If the argument instead specifies a corner of the box such as
971+
&lsquo;<code class=css>to top left</code>&rsquo;, the <a
972+
href="#gradient-line"><i>gradient line</i></a> must be angled such that
973+
it points into the same quadrant as the specified corner, and is
974+
perpendicular to a line intersecting the two neighboring corners of the
975+
<a href="#gradient-box"><i>gradient box</i></a>. <span class=note>This
976+
causes a color-stop at 50% to intersect the two neighboring corners (see
977+
<a href="#corner-gradient-example">example</a>).</span>
977978
</dl>
978979

979980
<p>Starting from the center of the <a href="#gradient-box"><i>gradient
@@ -1066,7 +1067,7 @@ <h4 class=no-toc id=linear-gradient-examples><span class=secno>4.1.2.
10661067
<p><img alt="" src=linear4.png></p>
10671068
</div>
10681069

1069-
<div class=example>
1070+
<div class=example id=corner-gradient-example>
10701071
<p>This demonstrates* a corner-to-corner gradient specified with keywords.
10711072
Note how the gradient is red and blue exactly in the bottom-left and
10721073
top-right corners, respectively, exactly like the second example.

css3-images/Overview.src.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,11 @@ <h4 class='no-toc' id='linear-gradient-syntax'>
591591
<dd>
592592
<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>
593593

594-
<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>
594+
<p>
595+
If the argument instead specifies a corner of the box such as ''to top left'',
596+
the <i>gradient line</i> must be angled such that it points into the same quadrant as the specified corner,
597+
and is perpendicular to a line intersecting the two neighboring corners of the <i>gradient box</i>.
598+
<span class='note'>This causes a color-stop at 50% to intersect the two neighboring corners (see <a href='#corner-gradient-example'>example</a>).</span>
595599
</dd>
596600
</dl>
597601

@@ -662,7 +666,7 @@ <h4 class='no-toc' id='linear-gradient-examples'>
662666
<p><img src="linear4.png" alt="" ></p>
663667
</div>
664668

665-
<div class=example>
669+
<div class=example id='corner-gradient-example'>
666670
<p>This demonstrates* a corner-to-corner gradient specified with keywords. Note how the gradient is red and blue exactly in the bottom-left and top-right corners, respectively, exactly like the second example. Additionally, the angle of the gradient is automatically computed so that the color at 50% (in this case, white) stretches across the top-left and bottom-right corners.</p>
667671

668672
<pre><code>linear-gradient(to top right, red, white, blue)</code></pre>

0 commit comments

Comments
 (0)