Skip to content

Commit 6ccea71

Browse files
tabatkinssvgeesus
authored andcommitted
fix markup
1 parent ea072d7 commit 6ccea71

1 file changed

Lines changed: 30 additions & 29 deletions

File tree

css-masking-1/Overview.bs

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ A closed vector path, shape or polygon defines a so called <dfn export>clipping
9191
<div class="example">
9292
<div class=figure>
9393
<img src="images/clipping-path.svg" width="655" height="260" alt="Example Mask">
94-
<p class=caption>A clipping path (middle) is applied on a polygon shaded with different colors (left). This results in a “clipped out” shape (right).</p>
94+
<p class=caption>A clipping path (middle) is applied on a polygon shaded with different colors (left). This results in a “clipped out” shape (right).
9595
</div>
9696
</div>
9797

@@ -105,7 +105,7 @@ The effect of applying a mask to a graphical object is as if the graphical objec
105105
<div class="example">
106106
<div class=figure>
107107
<img src="images/luminance-mask.svg" width="655" height="260" alt="Example Mask">
108-
<p class=caption>A luminance mask (middle) is applied on a shape filled with a gradient (left). This results in a masked shape (right).</p>
108+
<p class=caption>A luminance mask (middle) is applied on a shape filled with a gradient (left). This results in a masked shape (right).
109109
</div>
110110
</div>
111111

@@ -239,7 +239,7 @@ Specifies a basic shape or references a <a element>clipPath</a> element to creat
239239
::
240240
If specified in combination with a <<basic-shape>> it provides the reference box for the <<basic-shape>>.
241241

242-
If specified by itself, uses the edges of the specified box, including any corner shaping (e.g. defined by 'border-radius' [[!CSS3BG]]), as clipping path. See also <a href="https://www.w3.org/TR/css-shapes/#shapes-from-box-values">“Shapes from box values”</a> [[!CSS-SHAPES]].</p>
242+
If specified by itself, uses the edges of the specified box, including any corner shaping (e.g. defined by 'border-radius' [[!CSS3BG]]), as clipping path. See also <a href="https://www.w3.org/TR/css-shapes/#shapes-from-box-values">“Shapes from box values”</a> [[!CSS-SHAPES]].
243243
: <dfn>fill-box</dfn>
244244
:: Uses the <a>object bounding box</a> as reference box.
245245
: <dfn>stroke-box</dfn>
@@ -275,7 +275,7 @@ If the URI reference is not valid (e.g it points to an object that doesn't exist
275275
</div>
276276

277277
<div class=example>
278-
In this example, the 'clip-path' property references an SVG <a element>clipPath</a> element. Each comma separated length pair represents one point of the polygon. As for the previous example, the visualized clipping path can be seen in the <a href="#clipping">introduction</a>.</p>
278+
In this example, the 'clip-path' property references an SVG <a element>clipPath</a> element. Each comma separated length pair represents one point of the polygon. As for the previous example, the visualized clipping path can be seen in the <a href="#clipping">introduction</a>.
279279

280280
<pre><code highlight=css>
281281
clip-path: url("#clip1");
@@ -322,13 +322,14 @@ The 'clip-path' property is a <a href="https://www.w3.org/TR/2011/REC-SVG11-2011
322322
<dl dfn-type=element-attr dfn-for=clipPath>
323323
: <dfn element-attr>clipPathUnits</dfn> = "''clipPathUnits/userSpaceOnUse'' | ''clipPathUnits/objectBoundingBox''"
324324
::
325-
Defines the coordinate system for the contents of the <a element>clipPath</a>.</p>
326-
: <dfn dfn-type=value dfn-for=clipPathUnits>userSpaceOnUse</dfn></dt>
327-
:: The contents of the <a element>clipPath</a> represent values in the current <a>user coordinate system</a> in place at the time when the <a element>clipPath</a> element is referenced (i.e., the <a>user coordinate system</a> for the element referencing the <a element>clipPath</a> element via the 'clip-path' property).</p>
328-
: <dfn dfn-type=value dfn-for=clipPathUnits>objectBoundingBox</dfn></dt>
329-
:: The coordinate system has its origin at the top left corner of the <a>bounding box</a> of the element to which the clipping path applies to and the same width and height of this <a>bounding box</a>. <a href="https://www.w3.org/TR/SVG/coords.html#Units">User coordinates</a> are sized equivalently to the CSS ''px'' unit.</p>
325+
Defines the coordinate system for the contents of the <a element>clipPath</a>.
330326

331-
If attribute <a element-attr>clipPathUnits</a> is not specified, then the effect is as if a value of ''clipPathUnits/userSpaceOnUse'' were specified.</p>
327+
: <dfn dfn-type=value dfn-for=clipPathUnits>userSpaceOnUse</dfn>
328+
:: The contents of the <a element>clipPath</a> represent values in the current <a>user coordinate system</a> in place at the time when the <a element>clipPath</a> element is referenced (i.e., the <a>user coordinate system</a> for the element referencing the <a element>clipPath</a> element via the 'clip-path' property).
329+
: <dfn dfn-type=value dfn-for=clipPathUnits>objectBoundingBox</dfn>
330+
:: The coordinate system has its origin at the top left corner of the <a>bounding box</a> of the element to which the clipping path applies to and the same width and height of this <a>bounding box</a>. <a href="https://www.w3.org/TR/SVG/coords.html#Units">User coordinates</a> are sized equivalently to the CSS ''px'' unit.
331+
332+
If attribute <a element-attr>clipPathUnits</a> is not specified, then the effect is as if a value of ''clipPathUnits/userSpaceOnUse'' were specified.
332333

333334
Animatable: yes.
334335
</dl>
@@ -349,9 +350,9 @@ For a given <a>graphics element</a>, the actual clipping path used will be the i
349350

350351
A couple of additions:
351352

352-
* The <a element>clipPath</a> element itself and its child elements do <em>not</em> inherit clipping paths from the ancestors of the <a element>clipPath</a> element.</li>
353-
* The <a element>clipPath</a> element or any of its children can specify property 'clip-path'.<br> If a valid 'clip-path' reference is placed on a <a element>clipPath</a> element, the resulting clipping path is the intersection of the contents of the <a element>clipPath</a> element with the referenced clipping path.<br> If a valid 'clip-path' reference is placed on one of the children of a <a element>clipPath</a> element, then the given child element is clipped by the referenced clipping path before OR'ing the silhouette of the child element with the silhouettes of the other child elements.</li>
354-
* An empty clipping path will completely clip away the element that had the 'clip-path' property applied.</li>
353+
* The <a element>clipPath</a> element itself and its child elements do <em>not</em> inherit clipping paths from the ancestors of the <a element>clipPath</a> element.
354+
* The <a element>clipPath</a> element or any of its children can specify property 'clip-path'.<br> If a valid 'clip-path' reference is placed on a <a element>clipPath</a> element, the resulting clipping path is the intersection of the contents of the <a element>clipPath</a> element with the referenced clipping path.<br> If a valid 'clip-path' reference is placed on one of the children of a <a element>clipPath</a> element, then the given child element is clipped by the referenced clipping path before OR'ing the silhouette of the child element with the silhouettes of the other child elements.
355+
* An empty clipping path will completely clip away the element that had the 'clip-path' property applied.
355356

356357

357358
## Winding Rules: the 'clip-rule' property ## {#the-clip-rule}
@@ -382,17 +383,17 @@ The 'clip-rule' property only applies to <a>graphics elements</a> that are conta
382383
Note: The 'clip-rule' property does not apply to <<basic-shape>>s.
383384

384385
<div class=example>
385-
<p>The following drawing illustrates the <a value>nonzero</a> rule:</p>
386+
<p>The following drawing illustrates the <a value>nonzero</a> rule:
386387
<div class=figure>
387388
<p><img src="images/cliprule-nonzero.svg" alt="Shape with nonzero rule." width="450" style="border: solid black 1px;">
388389

389-
<p class=caption>Three shapes from left to right: Star with 5 points drawn in one continuous, overlapping line; 2 clockwise drawn circles, one contains the other and both are subpaths of the same shape; 2 circles, one containing the other with the bigger one drawn in a clockwise direction and the smaller one in a counter-clockwise direction and both belonging to the same shape. Only the last shape has a "hole".</p>
390+
<p class=caption>Three shapes from left to right: Star with 5 points drawn in one continuous, overlapping line; 2 clockwise drawn circles, one contains the other and both are subpaths of the same shape; 2 circles, one containing the other with the bigger one drawn in a clockwise direction and the smaller one in a counter-clockwise direction and both belonging to the same shape. Only the last shape has a "hole".
390391
</div>
391-
<p>The following drawing illustrates the <a value>evenodd</a> rule:</p>
392+
<p>The following drawing illustrates the <a value>evenodd</a> rule:
392393
<div class=figure>
393394
<p><img src="images/cliprule-evenodd.svg" alt="Shape with even-odd rule." width="450" style="border: solid black 1px;">
394395

395-
<p class=caption>Three shapes from left to right: Star with 5 points drawn in one continuous, overlapping line; 2 clockwise drawn circles, one contains the other and both are subpaths of the same shape; 2 circles, one containing the other with the bigger one drawn in a clockwise direction and the smaller one in a counter-clockwise direction and both belonging to the same shape. All 3 shapes have a "hole".</p>
396+
<p class=caption>Three shapes from left to right: Star with 5 points drawn in one continuous, overlapping line; 2 clockwise drawn circles, one contains the other and both are subpaths of the same shape; 2 circles, one containing the other with the bigger one drawn in a clockwise direction and the smaller one in a counter-clockwise direction and both belonging to the same shape. All 3 shapes have a "hole".
396397

397398
</div>
398399
</div>
@@ -568,7 +569,7 @@ See 'background-repeat' property [[!CSS3BG]] for the definitions of the property
568569
<div class=figure>
569570
<p><img src="images/mask-repeat.svg" alt="Image of an element with a dotted mask." width="240" style="border: solid black 1px;">
570571

571-
<p class=caption>The effect of ''mask-repeat/space'': the <a>mask layer image</a> of a dot is tiled to cover the whole <a>mask painting area</a> and the <a>mask layer image</a>s are equally spaced.</p>
572+
<p class=caption>The effect of ''mask-repeat/space'': the <a>mask layer image</a> of a dot is tiled to cover the whole <a>mask painting area</a> and the <a>mask layer image</a>s are equally spaced.
572573
</div>
573574
</div>
574575

@@ -604,7 +605,7 @@ See the 'background-position' property [[!CSS3BG]] for the definitions of the pr
604605
</div>
605606

606607
<div class=example>
607-
Mask positions can also be relative to other corners than the top left. E.g., the following puts the background image 10px from the bottom and 3em from the right:</p>
608+
Mask positions can also be relative to other corners than the top left. E.g., the following puts the background image 10px from the bottom and 3em from the right:
608609

609610
<pre><code highlight=css>mask-position: right 3em bottom 10px</code></pre>
610611
</div>
@@ -643,7 +644,7 @@ Values have the following meanings:
643644
:: The painted content is restricted to (clipped to) the <a>object bounding box</a>.
644645
: <dfn>stroke-box</dfn>
645646
:: The painted content is restricted to (clipped to) the <a>stroke bounding box</a>.
646-
: <dfn>view-box</dfn></dt>
647+
: <dfn>view-box</dfn>
647648
::
648649
Uses the nearest <a href="https://www.w3.org/TR/SVG11/intro.html#TermSVGViewport">SVG viewport</a> as reference box.
649650

@@ -782,31 +783,31 @@ All mask layers below the current mask layer must be composited before applying
782783

783784
With the property 'mask-composite' the author may choose different ways to combine multiple mask layers.
784785

785-
* ''mask-composite/add'' paints the <var>circle.svg</var> on top of <var>rect.svg</var>. The behavior is described by the compositing operator <a href='https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_srcover'>source over</a>.</p>
786+
* ''mask-composite/add'' paints the <var>circle.svg</var> on top of <var>rect.svg</var>. The behavior is described by the compositing operator <a href='https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_srcover'>source over</a>.
786787
<pre><code highlight=css>
787788
mask-composite: add;
788789
</code></pre>
789790

790791
<div class=figure>
791792
<img src="images/mask-composite-add.svg" width="220" height="220" alt="Example of source-over compositing of mask layers">
792793
</div>
793-
* ''mask-composite/subtract'' paints portions of <var>circle.svg</var> that do not overlap <var>rect.svg</var>. The behavior is described by the compositing operator <a href='https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_srcout'>source out</a>.</p>
794+
* ''mask-composite/subtract'' paints portions of <var>circle.svg</var> that do not overlap <var>rect.svg</var>. The behavior is described by the compositing operator <a href='https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_srcout'>source out</a>.
794795
<pre><code highlight=css>
795796
mask-composite: subtract;
796797
</code></pre>
797798

798799
<div class=figure>
799800
<img src="images/mask-composite-subtract.svg" width="220" height="220" alt="Example of source-over compositing of mask layers">
800801
</div>
801-
* ''mask-composite/intersect'' paints portions of <var>circle.svg</var> that overlap <var>rect.svg</var>. The behavior is described by the compositing operator <a href='https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_srcin'>source in</a>.</p>
802+
* ''mask-composite/intersect'' paints portions of <var>circle.svg</var> that overlap <var>rect.svg</var>. The behavior is described by the compositing operator <a href='https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_srcin'>source in</a>.
802803
<pre><code highlight=css>
803804
mask-composite: intersect;
804805
</code></pre>
805806

806807
<div class=figure>
807808
<img src="images/mask-composite-intersect.svg" width="220" height="220" alt="Example of source-over compositing of mask layers">
808809
</div>
809-
* ''mask-composite/exclude'' paints portions of <var>circle.svg</var> and <var>rect.svg</var> that do not overlap. The behavior is described by the compositing operator <a href='https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_xor'>XOR</a>.</p>
810+
* ''mask-composite/exclude'' paints portions of <var>circle.svg</var> and <var>rect.svg</var> that do not overlap. The behavior is described by the compositing operator <a href='https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_xor'>XOR</a>.
810811
<pre><code highlight=css>
811812
mask-composite: exclude;
812813
</code></pre>
@@ -931,7 +932,7 @@ With 'mask-border' an image can be split into nine pieces: four corners, four ed
931932

932933
<div class=figure>
933934
<img src="images/mask-box-image-mask.svg" alt="pieces of a mask border image" width="240">
934-
<p class=caption>Pieces of a <a>mask border image</a>.</p>
935+
<p class=caption>Pieces of a <a>mask border image</a>.
935936
</div>
936937

937938
These pieces may be sliced, scaled and stretched in various ways to fit the size of the <a>mask border image area</a>. This distorted image is then used as a mask. The syntax of 'mask-border' corresponds to the 'border-image' property of CSS Background and Borders [[!CSS3BG]].
@@ -941,7 +942,7 @@ These pieces may be sliced, scaled and stretched in various ways to fit the size
941942

942943
<div class=figure>
943944
<img src="images/mask-box-image.svg" alt="Example for 'mask-border'" width="720" height="240">
944-
<p class=caption>Example for 'mask-border'. The object on the left is the object to mask. The second image is the alpha mask and the last image the masked object.</p>
945+
<p class=caption>Example for 'mask-border'. The object on the left is the object to mask. The second image is the alpha mask and the last image the masked object.
945946
</div>
946947

947948
<pre><code highlight=css>
@@ -1249,7 +1250,7 @@ The 'mask-type' property allows the author of the <a element>mask</a> element to
12491250
&lt;/p>
12501251
</code></pre>
12511252

1252-
In the next example the computed value of 'mask-mode' is ''mask-mode/alpha'' and overrides the preference on the <a element>mask</a> element that is computed to ''mask-type/luminance''. The <a>mask layer image</a> is used as an alpha mask.</p>
1253+
In the next example the computed value of 'mask-mode' is ''mask-mode/alpha'' and overrides the preference on the <a element>mask</a> element that is computed to ''mask-type/luminance''. The <a>mask layer image</a> is used as an alpha mask.
12531254

12541255
<pre><code highlight=html>
12551256
lt;svg>
@@ -1303,7 +1304,7 @@ The 'clip' property applies only to absolutely positioned elements. In SVG, it a
13031304

13041305
<dl dfn-type=value dfn-for="clip">
13051306
: auto
1306-
:: The element does not clip.</dd>
1307+
:: The element does not clip.
13071308
: <dfn function>rect()</dfn> = rect( <<clip/top>>, <<clip/right>>, <<clip/bottom>>, <<clip/left>> )
13081309
::
13091310
<<clip/top>> and <<clip/bottom>> specify offsets from the top border edge of the box, and <<clip/right>>, and <<clip/left>> specify offsets from the left border edge of the box. Authors should separate offset values with commas. User agents must support separation with commas, but may also support separation without commas (but not a combination), because a previous revision of this specification was ambiguous in this respect.
@@ -1328,7 +1329,7 @@ The 'clip' property is a <a href="https://www.w3.org/TR/2011/REC-SVG11-20110816/
13281329

13291330
<div class=figure>
13301331
<img src="images/clip.svg" width="580" height="300" alt="Values for rect shape">
1331-
<p class=caption>This diagram illustrates two block boxes, one next to the other, with rectangular clipping regions of different dimensions. (See <a href="https://www.w3.org/TR/CSS2/images/longdesc/clip-desc.html">long description</a>.)</p>
1332+
<p class=caption>This diagram illustrates two block boxes, one next to the other, with rectangular clipping regions of different dimensions. (See <a href="https://www.w3.org/TR/CSS2/images/longdesc/clip-desc.html">long description</a>.)
13321333
</div>
13331334
</div>
13341335

0 commit comments

Comments
 (0)