You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<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).
95
95
</div>
96
96
</div>
97
97
@@ -105,7 +105,7 @@ The effect of applying a mask to a graphical object is as if the graphical objec
<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).
109
109
</div>
110
110
</div>
111
111
@@ -239,7 +239,7 @@ Specifies a basic shape or references a <a element>clipPath</a> element to creat
239
239
::
240
240
If specified in combination with a <<basic-shape>> it provides the reference box for the <<basic-shape>>.
241
241
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]].
243
243
: <dfn>fill-box</dfn>
244
244
:: Uses the <a>object bounding box</a> as reference box.
245
245
: <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
275
275
</div>
276
276
277
277
<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>.
279
279
280
280
<pre><code highlight=css>
281
281
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
:: 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>
:: 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>.
330
326
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>
:: 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).
:: 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.
332
333
333
334
Animatable: yes.
334
335
</dl>
@@ -349,9 +350,9 @@ For a given <a>graphics element</a>, the actual clipping path used will be the i
349
350
350
351
A couple of additions:
351
352
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.
355
356
356
357
357
358
## 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
382
383
Note: The 'clip-rule' property does not apply to <<basic-shape>>s.
383
384
384
385
<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:
386
387
<div class=figure>
387
388
<p><img src="images/cliprule-nonzero.svg" alt="Shape with nonzero rule." width="450" style="border: solid black 1px;">
388
389
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".
390
391
</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:
392
393
<div class=figure>
393
394
<p><img src="images/cliprule-evenodd.svg" alt="Shape with even-odd rule." width="450" style="border: solid black 1px;">
394
395
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".
396
397
397
398
</div>
398
399
</div>
@@ -568,7 +569,7 @@ See 'background-repeat' property [[!CSS3BG]] for the definitions of the property
568
569
<div class=figure>
569
570
<p><img src="images/mask-repeat.svg" alt="Image of an element with a dotted mask." width="240" style="border: solid black 1px;">
570
571
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.
572
573
</div>
573
574
</div>
574
575
@@ -604,7 +605,7 @@ See the 'background-position' property [[!CSS3BG]] for the definitions of the pr
604
605
</div>
605
606
606
607
<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:
608
609
609
610
<pre><code highlight=css>mask-position: right 3em bottom 10px</code></pre>
610
611
</div>
@@ -643,7 +644,7 @@ Values have the following meanings:
643
644
:: The painted content is restricted to (clipped to) the <a>object bounding box</a>.
644
645
: <dfn>stroke-box</dfn>
645
646
:: 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>
647
648
::
648
649
Uses the nearest <a href="https://www.w3.org/TR/SVG11/intro.html#TermSVGViewport">SVG viewport</a> as reference box.
649
650
@@ -782,31 +783,31 @@ All mask layers below the current mask layer must be composited before applying
782
783
783
784
With the property 'mask-composite' the author may choose different ways to combine multiple mask layers.
784
785
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>.
786
787
<pre><code highlight=css>
787
788
mask-composite: add;
788
789
</code></pre>
789
790
790
791
<div class=figure>
791
792
<img src="images/mask-composite-add.svg" width="220" height="220" alt="Example of source-over compositing of mask layers">
792
793
</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>.
794
795
<pre><code highlight=css>
795
796
mask-composite: subtract;
796
797
</code></pre>
797
798
798
799
<div class=figure>
799
800
<img src="images/mask-composite-subtract.svg" width="220" height="220" alt="Example of source-over compositing of mask layers">
800
801
</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>.
802
803
<pre><code highlight=css>
803
804
mask-composite: intersect;
804
805
</code></pre>
805
806
806
807
<div class=figure>
807
808
<img src="images/mask-composite-intersect.svg" width="220" height="220" alt="Example of source-over compositing of mask layers">
808
809
</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>.
810
811
<pre><code highlight=css>
811
812
mask-composite: exclude;
812
813
</code></pre>
@@ -931,7 +932,7 @@ With 'mask-border' an image can be split into nine pieces: four corners, four ed
931
932
932
933
<div class=figure>
933
934
<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>.
935
936
</div>
936
937
937
938
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
941
942
942
943
<div class=figure>
943
944
<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.
945
946
</div>
946
947
947
948
<pre><code highlight=css>
@@ -1249,7 +1250,7 @@ The 'mask-type' property allows the author of the <a element>mask</a> element to
1249
1250
</p>
1250
1251
</code></pre>
1251
1252
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.
1253
1254
1254
1255
<pre><code highlight=html>
1255
1256
lt;svg>
@@ -1303,7 +1304,7 @@ The 'clip' property applies only to absolutely positioned elements. In SVG, it a
<<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/
1328
1329
1329
1330
<div class=figure>
1330
1331
<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>.)
0 commit comments