Skip to content

Commit 0825d04

Browse files
committed
Replace 'source-over' with 'plus' per <http://lists.w3.org/Archives/Public/www-style/2011May/0077.html>, pull out informative text into a note, mark up variables and expressions properly, replace 'syntax error' with 'invalid'
1 parent 4a6c921 commit 0825d04

2 files changed

Lines changed: 41 additions & 28 deletions

File tree

css3-images/Overview.html

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

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

18-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 5 May 2011</h2>
18+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 6 May 2011</h2>
1919

2020
<dl>
2121
<dt>Latest Version:
@@ -566,12 +566,16 @@ <h3 id=cross-fade-function><span class=secno>4.4. </span> Combining images:
566566
images. This is accomplished with the &lsquo;<code
567567
class=css>cross-fade()</code>&rsquo; function, which indicates the two
568568
images to be combined and how far along in the transition the combination
569-
is. Authors may also use the &lsquo;<code
569+
is.
570+
571+
<p class=note>Authors can also use the &lsquo;<code
570572
class=css>cross-fade()</code>&rsquo; function for many simple image
571573
manipulations, such as tinting an image with a solid color or highlighting
572574
a particular area of the page by combining an image with a radial
573-
gradient. The syntax for &lsquo;<code class=css>cross-fade()</code>&rsquo;
574-
is defined as:
575+
gradient.
576+
577+
<p>The syntax for &lsquo;<code class=css>cross-fade()</code>&rsquo; is
578+
defined as:
575579

576580
<pre
577581
class=prod><dfn id=ltimage-combination>&lt;image-combination></dfn> = cross-fade( &lt;image>, &lt;image>, &lt;percentage> )</pre>
@@ -581,19 +585,20 @@ <h3 id=cross-fade-function><span class=secno>4.4. </span> Combining images:
581585
respectively). The percentage represents how far along the transformation
582586
is, with 0% representing the start image, 100% representing the end image,
583587
and percentages between that representing corresponding combinations of
584-
the two images. The &lt;percentage> must be between 0% and 100% inclusive;
585-
any other value is a syntax error.
588+
the two images. The <code>&lt;percentage></code> must be between 0% and
589+
100% inclusive; any other value is invalid.
586590

587-
<p>Given the &lt;percentage> p, the combined image represented by the
591+
<p>Given the percentage <var>p</var>, the combined image represented by the
588592
&lsquo;<code class=css>cross-fade()</code>&rsquo; function has a width
589-
equal to <code>start image width * (1-p) + end image width * p</code> and
590-
a height equal to <code>start image height * (1-p) + end image height *
591-
p</code>. The image itself is generated by first scaling both the start
592-
and end images to the size of the combined image. Then, the start image
593-
has a global alpha applied to it equal to (1-p), the end image has a
594-
global alpha applied to it equal to p, and the end image is then
595-
composited over the start image with the source-over operation.
596-
[[PORTERDUFF]]</p>
593+
equal to <code><var>start image width</var> &times; (1-<var>p</var>) +
594+
<var>end image width</var> &times; <var>p</var></code> and a height equal
595+
to <code><var>start image height</var> &times; (1-<var>p</var>) + <var>end
596+
image height</var> &times; <var>p</var></code>. The image itself is
597+
generated by first scaling both the start and end images to the size of
598+
the combined image. Then, the start image has a global alpha applied to it
599+
equal to <code>(1-<var>p</var>)</code>, the end image has a global alpha
600+
applied to it equal to <var>p</var>, and the end image is then composited
601+
over the start image with the plus operation. [[PORTERDUFF]]</p>
597602
<!-- ====================================================================== -->
598603

599604
<h2 id=gradients><span class=secno>5. </span> Gradients</h2>

css3-images/Overview.src.html

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,14 @@ <h3 id='cross-fade-function'>
351351
to the intermediate image that is a combination of the start and end images.
352352
This is accomplished with the ''cross-fade()'' function, which indicates
353353
the two images to be combined and how far along in the transition the
354-
combination is. Authors may also use the ''cross-fade()'' function for many
354+
combination is.
355+
356+
<p class="note">Authors can also use the ''cross-fade()'' function for many
355357
simple image manipulations, such as tinting an image with a solid color or
356358
highlighting a particular area of the page by combining an image with a
357-
radial gradient. The syntax for ''cross-fade()'' is defined as:</p>
359+
radial gradient.
360+
361+
<p>The syntax for ''cross-fade()'' is defined as:</p>
358362

359363
<pre class=prod><dfn>&lt;image-combination></dfn> = cross-fade( &lt;image>, &lt;image>, &lt;percentage> )</pre>
360364

@@ -363,17 +367,21 @@ <h3 id='cross-fade-function'>
363367
respectively). The percentage represents how far along the transformation
364368
is, with 0% representing the start image, 100% representing the end image,
365369
and percentages between that representing corresponding combinations of the
366-
two images. The &lt;percentage> must be between 0% and 100% inclusive; any
367-
other value is a syntax error.</p>
368-
369-
<p>Given the &lt;percentage> p, the combined image represented by the
370-
''cross-fade()'' function has a width equal to <code>start image width *
371-
(1-p) + end image width * p</code> and a height equal to <code>start image
372-
height * (1-p) + end image height * p</code>. The image itself is generated
373-
by first scaling both the start and end images to the size of the combined
374-
image. Then, the start image has a global alpha applied to it equal to (1-p),
375-
the end image has a global alpha applied to it equal to p, and the end image
376-
is then composited over the start image with the source-over operation.
370+
two images. The <code>&lt;percentage></code> must be between 0% and 100% inclusive;
371+
any other value is invalid.</p>
372+
373+
<p>Given the percentage <var>p</var>, the combined image represented by
374+
the ''cross-fade()'' function has a width equal to
375+
<code><var>start image width</var> &times; (1-<var>p</var>) +
376+
<var>end image width</var> &times; <var>p</var></code>
377+
and a height equal to
378+
<code><var>start image height</var> &times; (1-<var>p</var>) +
379+
<var>end image height</var> &times; <var>p</var></code>.
380+
The image itself is generated by first scaling both the start and end images
381+
to the size of the combined image.
382+
Then, the start image has a global alpha applied to it equal to <code>(1-<var>p</var>)</code>,
383+
the end image has a global alpha applied to it equal to <var>p</var>, and the end image
384+
is then composited over the start image with the plus operation.
377385
[[PORTERDUFF]]</p>
378386

379387
<!-- ====================================================================== -->

0 commit comments

Comments
 (0)