Skip to content

Commit 82f3d35

Browse files
committed
Make 'box' definition for gradients normative, rearrange some prose accordingly
1 parent 5496d07 commit 82f3d35

2 files changed

Lines changed: 33 additions & 29 deletions

File tree

css3-images/Overview.html

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -686,12 +686,8 @@ <h2 id=gradients><span class=secno>5. </span> Gradients</h2>
686686
These are commonly used for subtle shading in background images, buttons,
687687
and many other things. The two functions described in this section allow
688688
an author to specify such an image in a terse syntax, so that the UA can
689-
generate the image automatically when rendering the page. Gradients are a
690-
type of image, and can be used anywhere an image can, such as in the
691-
&lsquo;<code class=property>background-image</code>&rsquo; or &lsquo;<code
692-
class=property>list-style-image</code>&rsquo; properties. Gradients have
693-
no <a href="#intrinsic-dimensions"><i>intrinsic dimensions</i></a>. The
694-
syntax of a <a href="#ltgradient"><i>&lt;gradient></i></a> is:
689+
generate the image automatically when rendering the page. The syntax of a
690+
<a href="#ltgradient"><i>&lt;gradient></i></a> is:
695691

696692
<pre
697693
class=prod><dfn id=ltgradient>&lt;gradient></dfn> = [ &lt;linear-gradient> | &lt;radial-gradient> | &lt;repeating-linear-gradient> | &lt;repeating-radial-gradient> ]</pre>
@@ -703,6 +699,10 @@ <h2 id=gradients><span class=secno>5. </span> Gradients</h2>
703699
href="#ltrepeating-radial-gradient"><i>&lt;repeating-radial-gradient></i></a>
704700
are defined in their applicable sections below.
705701

702+
<p>Gradients are a type of image, and can be used anywhere an image can,
703+
such as in the &lsquo;<code class=property>background-image</code>&rsquo;
704+
or &lsquo;<code class=property>list-style-image</code>&rsquo; properties.
705+
706706
<div class=example>
707707
<p>As with the other <a href="#ltimage"><i>&lt;image></i></a> types
708708
defined in this specification, gradients can be used in any property that
@@ -716,18 +716,19 @@ <h2 id=gradients><span class=secno>5. </span> Gradients</h2>
716716
</ul>
717717
</div>
718718

719-
<p class=note>In many places this section references a box, such as "the
720-
box's top-left corner" or "the box's right side". In all of these
721-
circumstances, the "box" refers to a rectangle with the dimensions of the
722-
<a href="#concrete-object-size"><i>concrete object size</i></a>. A
723-
gradient has no intrinsic dimensions. This means that, for example, if you
724-
use a gradient in the &lsquo;<code
725-
class=property>background-image</code>&rsquo; property (with &lsquo;<code
726-
class=property>background-size</code>&rsquo; at the default value and
727-
&lsquo;<code class=property>background-repeat</code>&rsquo; not equal to
728-
&lsquo;<code class=property>round</code>&rsquo;), the "box" will simply be
729-
the size of the background sizing area. If you use a gradient in a
730-
list-style-image, the "box" will be a 1em square.
719+
<p>A gradient is drawn into a box with the dimensions of the <a
720+
href="#concrete-object-size"><i>concrete object size</i></a>. Elsewhere in
721+
this section this rectangle is simply called the "box".
722+
723+
<p>A gradient has no <a href="#intrinsic-dimensions"><i>intrinsic
724+
dimensions</i></a>. This means that, for example, if you use a gradient in
725+
the &lsquo;<code class=property>background-image</code>&rsquo; property
726+
(with &lsquo;<code class=property>background-size</code>&rsquo; at the
727+
default value and &lsquo;<code
728+
class=property>background-repeat</code>&rsquo; not equal to &lsquo;<code
729+
class=property>round</code>&rsquo;), the box will simply be the size of
730+
the background sizing area. Similarly, for a gradient used as a
731+
list-style-image, the box would be a 1em square.
731732

732733
<p class=issue>It has been suggested that several of the controls offered
733734
by gradients are unnecessary. Repeating gradients could potentially be

css3-images/Overview.src.html

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,7 @@ <h2 id="gradients">
444444
are commonly used for subtle shading in background images, buttons, and many
445445
other things. The two functions described in this section allow an author to
446446
specify such an image in a terse syntax, so that the UA can generate the image
447-
automatically when rendering the page. Gradients are a type of image, and can
448-
be used anywhere an image can, such as in the 'background-image' or
449-
'list-style-image' properties. Gradients have no <i>intrinsic dimensions</i>.
447+
automatically when rendering the page.
450448
The syntax of a <i>&lt;gradient></i> is:</p>
451449

452450
<pre class=prod><dfn>&lt;gradient></dfn> = [ &lt;linear-gradient> | &lt;radial-gradient> | &lt;repeating-linear-gradient> | &lt;repeating-radial-gradient> ]</pre>
@@ -455,6 +453,9 @@ <h2 id="gradients">
455453
<i>&lt;repeating-linear-gradient></i>, and <i>&lt;repeating-radial-gradient></i> are
456454
defined in their applicable sections below.</p>
457455

456+
<p>Gradients are a type of image, and can be used anywhere an image can,
457+
such as in the 'background-image' or 'list-style-image' properties.
458+
458459
<div class=example>
459460
<p>As with the other <i>&lt;image></i> types defined in this specification,
460461
gradients can be used in any property that accepts images. For example:</p>
@@ -464,14 +465,16 @@ <h2 id="gradients">
464465
</ul>
465466
</div>
466467

467-
<p class=note>In many places this section references a box, such as "the box's
468-
top-left corner" or "the box's right side". In all of these circumstances,
469-
the "box" refers to a rectangle with the dimensions of the <i>concrete object size</i>.
470-
A gradient has no intrinsic dimensions. This means that, for example, if you use a gradient in the
471-
'background-image' property (with 'background-size' at the default value and 'background-repeat'
472-
not equal to 'round'), the "box" will simply be the size of the background sizing
473-
area. If you use a gradient in a list-style-image, the "box" will be a 1em
474-
square.</p>
468+
<p>A gradient is drawn into a box with the dimensions of the <i>concrete
469+
object size</i>. Elsewhere in this section this rectangle is simply
470+
called the "box".
471+
472+
<p>A gradient has no <i>intrinsic dimensions</i>. This means that, for
473+
example, if you use a gradient in the 'background-image' property (with
474+
'background-size' at the default value and 'background-repeat' not equal to
475+
'round'), the box will simply be the size of the background sizing
476+
area. Similarly, for a gradient used as a list-style-image, the box
477+
would be a 1em square.
475478

476479
<p class=issue>It has been suggested that several of the controls offered by gradients are unnecessary. Repeating gradients could potentially be done by hooking into ‘background-repeat’, sizing and positioning radial gradients could be done by hooking into ‘background-size’ and ‘background-position’, etc.</p>
477480

0 commit comments

Comments
 (0)