Skip to content

Commit a3f3495

Browse files
Rik Cabaniersvgeesus
authored andcommitted
merged changes
1 parent 79e96da commit a3f3495

2 files changed

Lines changed: 41 additions & 42 deletions

File tree

css-masking-1/Overview.src.html

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ <h2 id='intro'>Introduction</h2>
2525

2626
This specification defines two different graphical operations which both fully or partly hide portions of an object.
2727

28-
The <b>first operation</b> is called clipping.
28+
<h3 id="clipping">Clipping</h3>
29+
30+
The first operation is called clipping.
2931

3032
<div class="example">
3133
<div class=figure>
@@ -40,7 +42,9 @@ <h2 id='intro'>Introduction</h2>
4042

4143
The 'clip-path' property can reference SVG <a>graphics element</a> or use specified basic shapes as clipping path.
4244

43-
The <b>second operation</b> is called masking.
45+
<h3 id="masking">Masking</h3>
46+
47+
The second operation is called masking.
4448

4549
<div class="example">
4650
<div class=figure>
@@ -51,11 +55,11 @@ <h2 id='intro'>Introduction</h2>
5155
</div>
5256
</div>
5357

54-
The effect of applying a mask is as if the mask images or <i>mask sources</i> are rendered into an off-screen image which has been initialized to transparent black. The graphical object to which the mask is applied will be painted onto the background through the mask, thus completely or partially masking out parts of the graphical object.
58+
The effect of applying a mask to a graphical object is as if the graphical object to which the mask is applied will be painted onto the background through the mask, thus completely or partially masking out parts of the graphical object.
5559

5660
Masks are applied using the 'mask-image' or 'mask-box-image-source' properties.
5761

58-
The 'mask-image' property may reference a <a>'mask element'</a> as the mask source. Alternatively, for many simple uses, the 'mask-image' property may refer directly to images to be used as mask, forgoing the need for an explicit <a>'mask element'</a> element. The 'mask' property serves as a shorthand property for 'mask-box-image', 'mask-image' and other characterizing properties.
62+
The 'mask-image' property may reference a <a>'mask'</a> element. In this case the content of the <a>'mask'</a> element is rendered into an off-screen image which has been initialized to transparent black. This off-screen image is taken as mask image. Alternatively, for many simple uses, the 'mask-image' property may refer directly to images to be used as mask image, forgoing the need for an explicit <a>'mask'</a> element. The 'mask' property serves as a shorthand property for 'mask-box-image', 'mask-image' and other characterizing properties.
5963

6064
The 'mask-box-image-source' property splits a mask image into 9 pieces. The pieces may be sliced, scaled and stretched in various ways to fit the size of the <i>mask box image area</i>. The 'mask-box-image' property serves as a shorthand property for 'mask-box-image-source' and other characterizing properties.
6165

@@ -96,10 +100,6 @@ <h2 id="terminology">Terminology</h2>
96100
If the element does not have an associated CSS layout box and is in the <code>http://www.w3.org/2000/svg</code> namespace, the current user coordinate system has its origin at the top-left corner of the element's nearest viewport.
97101
</p>
98102
</dd>
99-
<dt><dfn>mask source</dfn></dt>
100-
<dd>
101-
An off-screen image which has been initialized to transparent black. The graphical object to which the mask is applied will be painted onto the background through the mask, thus completely or partially masking out parts of the graphical object.
102-
</dd>
103103
</dl>
104104

105105
Definitions of CSS properties and values in this specification are analogous to definitions in CSS Backgrounds and Borders [[!CSS3BG]]. To avoid redundancy, this specification relies on descriptions and definitions of CSS Backgrounds and Borders. The following terms in CSS Backgrounds and Borders have the following meaning in this specification:
@@ -373,7 +373,7 @@ <h3 id="the-mask-image">The 'mask-image' property</h3>
373373
Animatable: no
374374
</pre>
375375

376-
This property sets the mask image or the <i>mask source</i> of an element. Where:
376+
This property sets the mask image of an element. Where:
377377

378378
<pre class=prod><dfn>&lt;mask-reference></dfn> = none | <<image>> | <<mask-source>></pre>
379379

@@ -396,7 +396,7 @@ <h3 id="the-mask-image">The 'mask-image' property</h3>
396396

397397
A mask reference that is an empty image (zero width or zero height), that fails to download, is not a reference to an <a>'mask element'</a> element, is non-existent, or that cannot be displayed (e.g. because it is not in a supported image format) is ignored. It still counts as an image layer but does not mask the element.
398398

399-
See the section <a href="#MaskValues">“Mask source values</a> for how to process a <<mask-source>>.
399+
See the section <a href="#MaskValues">“Mask processing</a> for how to process a mask image.
400400

401401
<div class="example">
402402
<p>Examples for mask references:</p>
@@ -421,7 +421,7 @@ <h3 id="the-mask-source-type">The 'mask-source-type' property</h3>
421421
Animatable: no
422422
</pre>
423423

424-
The 'mask-source-type' property indicates whether the <<mask-reference>> is treated as luminance mask or alpha mask. (See <a href="#MaskValues">Mask Source values</a>.)
424+
The 'mask-source-type' property indicates whether the <<mask-reference>> is treated as luminance mask or alpha mask. (See <a href="#MaskValues">Mask processing</a>.)
425425

426426
<pre class=prod><dfn>&lt;source-type></dfn> = alpha | luminance | auto</pre>
427427

@@ -642,7 +642,7 @@ <h3 id="the-mask">The 'mask' property</h3>
642642

643643
If one <<box>> value is present then it sets both 'mask-origin' and 'mask-clip' to that value. If two <<box>> values are present, then the first sets 'mask-origin' and the second 'mask-clip'.
644644

645-
The <i>used value</i> of the properties 'mask-image', 'mask-repeat', 'mask-position', 'mask-clip', 'mask-origin' and 'mask-size' must have no effect if <<mask-reference>> references a <a>'mask element'</a> element. In this case the element defines position, sizing and clipping of the <i>mask source</i>.
645+
The <i>used value</i> of the properties 'mask-image', 'mask-repeat', 'mask-position', 'mask-clip', 'mask-origin' and 'mask-size' must have no effect if <<mask-reference>> references a <a>'mask element'</a> element. In this case the element defines position, sizing and clipping of the mask image.
646646

647647
The 'mask' shorthand also resets 'mask-box-image' to its initial value. It is therefore recommended that authors use the 'mask' shorthand, rather than other shorthands or the individual properties, to override any mask settings earlier in the cascade. This will ensure that 'mask-box-image' has also been reset to allow the new styles to take effect.
648648

@@ -654,13 +654,13 @@ <h3 id="the-mask-image-rendering-model">The Mask Image Rendering Model</h3>
654654

655655
The 'mask-image' property has no effect on the geometry or hit-testing of any element's CSS boxes.
656656

657-
<h4 id="MaskValues">Mask Source values</h4>
657+
<h4 id="MaskValues">Mask processing</h4>
658658

659-
A mask may be interpreted using one of two different methods with regards to calculating the mask values that will be multiplied with the target alpha values.
659+
A mask image may be interpreted using one of two different methods with regards to calculating the mask values that will be multiplied with the target alpha values.
660660

661-
The first and simplest method of calculating the mask values is to use the alpha channel of the mask source. In this case the mask value at a given point is simply the value of the alpha channel at that point. The color channels do not contribute to the mask value.
661+
The first and simplest method of calculating the mask values is to use the alpha channel of the mask image. In this case the mask value at a given point is simply the value of the alpha channel at that point. The color channels do not contribute to the mask value.
662662

663-
The second method of calculating the mask values is to use the luminance of the mask source. In this case the mask value at a given point is computed from the color channel values and alpha channel value using the following procedure.
663+
The second method of calculating the mask values is to use the luminance of the mask image. In this case the mask value at a given point is computed from the color channel values and alpha channel value using the following procedure.
664664

665665
<ol>
666666
<li>Compute a luminance value from the color channel values.
@@ -837,7 +837,7 @@ <h2 id="the-mask-type">The 'mask-type' property</h2>
837837
&lt;/p>
838838
</code></pre>
839839

840-
<p>In the next example the computed value of 'mask-source-type' is <a value for=mask-source-type>alpha</a> and overrides the preference on the <a>'mask element'</a> element that is computed to <a value for=mask-type>luminance</a>. The mask source is used as an alpha mask.
840+
<p>In the next example the computed value of 'mask-source-type' is <a value for=mask-source-type>alpha</a> and overrides the preference on the <a>'mask element'</a> element that is computed to <a value for=mask-type>luminance</a>. The mask image is used as an alpha mask.
841841

842842
<pre><code>
843843
&lt;svg>
@@ -903,7 +903,7 @@ <h3 id="the-mask-box-image-source">The 'mask-box-image-source' property</h3>
903903
Animatable: no
904904
</pre>
905905

906-
Specifies an image to be used as mask.
906+
Specifies an image to be used as mask image.
907907

908908
An image that is an empty image (zero width or zero height), that fails to download, is non-existent, or that cannot be displayed (e.g. because it is not in a supported image format) is ignored. It still counts as an mask image but does not mask the element.
909909

@@ -1158,7 +1158,7 @@ <h2 class="no-num" id="changes">Changes since last publication</h2>
11581158
<ul>
11591159
<li>'mask' resets 'mask-box-image' properties.</li>
11601160
<li>Initial values for 'mask-repeat', 'mask-position' and 'mask-origin' changed to ''no-repeat'', ''center'' and <a value for=mask-origin>border-box</a>.</li>
1161-
<li>Multiple layers of <i>mask sources</i> were deferred to a future level of this specification.</li>
1161+
<li>Multiple layers of mask images were deferred to a future level of this specification.</li>
11621162
<li>Added security model for pixel operations and fetching of masking and clipping resources.</li>
11631163
<li>Deferred ''child'' and select() function to next level.</li>
11641164
</ul>

0 commit comments

Comments
 (0)