masking/index.html

Wed, 13 Mar 2013 13:16:38 -0700

author
Dirk Schulze <dschulze@adobe.com>
date
Wed, 13 Mar 2013 13:16:38 -0700
changeset 746
f0bee7474714
parent 741
cd0593275768
child 805
f984d3d17e42
permissions
-rw-r--r--

http://lists.w3.org/Archives/Public/www-style/2013Mar/0228.html

dschulze@344 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
dschulze@344 2 "http://www.w3.org/TR/html4/strict.dtd">
dschulze@273 3
dschulze@273 4 <html lang=en>
dschulze@427 5 <head profile="http://dublincore.org/documents/2008/08/04/dc-html/ ">
dschulze@427 6 <meta content="text/html; charset=utf-8" http-equiv=Content-Type>
dschulze@273 7 <title>CSS Masking</title>
dschulze@427 8
dschulze@445 9 <link href="http://purl.org/dc/terms/" rel=schema.dcterms>
dschulze@445 10 <link href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
dschulze@445 11 rel=dcterms.rights>
dschulze@445 12 <meta content="CSS Masking" name=dcterms.title>
dschulze@445 13 <meta content=text name=dcterms.type>
dschulze@746 14 <meta content=2013-03-13 name=dcterms.issued>
dschulze@708 15 <meta
dschulze@708 16 content="http://dvcs.w3.org/hg/FXTF/raw-file/default/masking/index.html"
dschulze@445 17 name=dcterms.creator>
dschulze@445 18 <meta content=W3C name=dcterms.publisher>
dschulze@659 19 <meta content="http://dev.w3.org/csswg/css-masking/"
dschulze@445 20 name=dcterms.identifier>
dschulze@273 21 <link href="#contents" rel=contents>
dschulze@273 22 <link href="#index" rel=index>
dschulze@273 23 <link href=default.css rel=stylesheet type="text/css">
dschulze@273 24 <link href="http://www.w3.org/StyleSheets/TR/W3C-ED.css" rel=stylesheet
dschulze@427 25 type="text/css">
dschulze@696 26 <script defer=defer
dschulze@696 27 src="http://test.csswg.org/harness/annotate.js#CSS-MASKING_DEV"
dschulze@696 28 type="text/javascript"></script>
dschulze@273 29
dschulze@273 30 <body>
dschulze@273 31 <div class=head> <!--begin-logo-->
dschulze@273 32 <p><a href="http://www.w3.org/"><img alt=W3C height=48
dschulze@273 33 src="http://www.w3.org/Icons/w3c_home" width=72></a> <!--end-logo-->
dschulze@273 34
dschulze@273 35 <h1>CSS Masking</h1>
dschulze@273 36
dschulze@746 37 <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 13 March 2013</h2>
dschulze@273 38
dschulze@273 39 <dl>
dschulze@273 40 <dt>This version:
dschulze@273 41
dschulze@273 42 <dd><a
dschulze@708 43 href="http://dvcs.w3.org/hg/FXTF/raw-file/default/masking/index.html">http://dvcs.w3.org/hg/FXTF/raw-file/default/masking/index.html</a>
dschulze@746 44 <!--http://www.w3.org/TR/2013/WD-css-masking-20130313/-->
dschulze@273 45
dschulze@273 46 <dt>Latest version:
dschulze@273 47
dschulze@273 48 <dd><a
dschulze@273 49 href="http://www.w3.org/TR/css-masking/">http://www.w3.org/TR/css-masking/</a>
dschulze@273 50
dschulze@273 51 <dt>Editor's draft:
dschulze@273 52
dschulze@273 53 <dd><a
dschulze@708 54 href="http://dvcs.w3.org/hg/FXTF/raw-file/default/masking/index.html">http://dvcs.w3.org/hg/FXTF/raw-file/default/masking/index.html</a>
dschulze@273 55
dschulze@273 56 <dt>Editors:
dschulze@273 57
dschulze@427 58 <dd class=vcard> <span class=fn>Dirk Schulze</span>, <span
dschulze@427 59 class=org>Adobe Systems</span>, <span
dschulze@427 60 class=email>dschulze@adobe.com</span>
dschulze@427 61
dschulze@441 62 <dd class=vcard> <span class=fn>Brian Birtles</span>, <span
dschulze@441 63 class=org>Mozilla Japan</span>, <span
dschulze@441 64 class=email>bbirtles@mozilla.com</span>
dschulze@441 65
dschulze@427 66 <dd class=vcard> <span class=fn><a
dschulze@427 67 href="http://www.xanthir.com/contact/">Tab Atkins Jr.</a></span>, <span
dschulze@427 68 class=org>Google, Inc.</span>
dschulze@273 69 </dl>
dschulze@273 70 <!--begin-copyright-->
dschulze@273 71 <p class=copyright><a
dschulze@273 72 href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
dschulze@607 73 rel=license>Copyright</a> © 2013 <a href="http://www.w3.org/"><abbr
dschulze@273 74 title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a
dschulze@273 75 href="http://www.csail.mit.edu/"><abbr
dschulze@273 76 title="Massachusetts Institute of Technology">MIT</abbr></a>, <a
dschulze@273 77 href="http://www.ercim.eu/"><abbr
dschulze@273 78 title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
dschulze@659 79 <a href="http://www.keio.ac.jp/">Keio</a>, <a
dschulze@659 80 href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved. W3C <a
dschulze@273 81 href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
dschulze@273 82 <a
dschulze@273 83 href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
dschulze@273 84 and <a
dschulze@273 85 href="http://www.w3.org/Consortium/Legal/copyright-documents">document
dschulze@273 86 use</a> rules apply.</p>
dschulze@273 87 <!--end-copyright-->
dschulze@273 88 <hr title="Separator for header">
dschulze@273 89 </div>
dschulze@273 90
dschulze@273 91 <h2 class="no-num no-toc" id=abstract>Abstract</h2>
dschulze@273 92
birtles@466 93 <p> CSS Masking provides two means for partially or fully hiding portions
birtles@466 94 of visual elements: masking and clipping.
dschulze@454 95
dschulze@454 96 <p> Masking describes how to use another graphical element or image as a
birtles@466 97 luminance or alpha mask. Typically, rendering an element via CSS or SVG
dschulze@279 98 can conceptually described as if the element, including its children, are
birtles@466 99 drawn into a buffer and then that buffer is composited into the element's
birtles@466 100 parent. Luminance and alpha masks influence the transparency of this
birtles@466 101 buffer before the compositing stage.
birtles@466 102
birtles@466 103 <p> Clipping describes the visible region of visual elements. The region
birtles@466 104 can be described by using certain SVG graphics elements or basic shapes.
birtles@466 105 Anything outside of this region is not rendered.
dschulze@454 106
dschulze@273 107 <h2 class="no-num no-toc" id=status>Status of this document</h2>
dschulze@273 108 <!--begin-status-->
dschulze@273 109
dschulze@273 110 <p>This is a public copy of the editors' draft. It is provided for
dschulze@273 111 discussion only and may change at any moment. Its publication here does
dschulze@273 112 not imply endorsement of its contents by W3C. Don't cite this document
dschulze@273 113 other than as work in progress.
dschulze@273 114
dschulze@273 115 <p>The (<a
dschulze@273 116 href="http://lists.w3.org/Archives/Public/public-fx/">archived</a>) public
dschulze@273 117 mailing list <a href="mailto:public-fx@w3.org">public-fx@w3.org</a> (see
dschulze@273 118 <a href="http://www.w3.org/Mail/Request">instructions</a>) is preferred
dschulze@273 119 for discussion of this specification. When sending e-mail, please put the
dschulze@273 120 text “css-masking” in the subject, preferably like this:
dschulze@273 121 “[<!---->css-masking<!---->] <em>…summary of comment…</em>”
dschulze@273 122
dschulze@273 123 <p>This document was produced by the <a
dschulze@273 124 href="http://www.w3.org/Style/CSS/members">CSS Working Group</a> (part of
dschulze@273 125 the <a href="http://www.w3.org/Style/">Style Activity</a>) and the <a
dschulze@273 126 href="http://www.w3.org/Graphics/SVG/">SVG Working Group</a> (part of the
dschulze@273 127 <a href="http://www.w3.org/Graphics/">Graphics Activity</a>).
dschulze@273 128
dschulze@273 129 <p>This document was produced by groups operating under the <a
dschulze@273 130 href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February
dschulze@273 131 2004 W3C Patent Policy</a>. W3C maintains a <a
dschulze@273 132 href="http://www.w3.org/2004/01/pp-impl/32061/status"
dschulze@273 133 rel=disclosure>public list of any patent disclosures (CSS)</a> and a <a
dschulze@273 134 href="http://www.w3.org/2004/01/pp-impl/19480/status"
dschulze@273 135 rel=disclosure>public list of any patent disclosures (SVG)</a> made in
dschulze@273 136 connection with the deliverables of each group; these pages also include
dschulze@273 137 instructions for disclosing a patent. An individual who has actual
dschulze@273 138 knowledge of a patent which the individual believes contains <a
dschulze@273 139 href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
dschulze@273 140 Claim(s)</a> must disclose the information in accordance with <a
dschulze@273 141 href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
dschulze@273 142 6 of the W3C Patent Policy</a>.</p>
dschulze@273 143 <!--end-status-->
dschulze@273 144
dschulze@273 145 <h2 class="no-num no-toc" id=contents> Table of contents</h2>
dschulze@273 146 <!--begin-toc-->
dschulze@273 147
dschulze@273 148 <ul class=toc>
dschulze@273 149 <li><a href="#intro"><span class=secno>1. </span> Introduction </a>
dschulze@273 150
dschulze@279 151 <li><a href="#placement"><span class=secno>2. </span>Module
dschulze@279 152 interactions</a>
dschulze@279 153
dschulze@279 154 <li><a href="#values"><span class=secno>3. </span>Values</a>
dschulze@273 155
dschulze@746 156 <li><a href="#terminology"><span class=secno>4. </span>Terminology</a>
dschulze@273 157
dschulze@281 158 <li><a href="#the-mask-rendering-model"><span class=secno>5. </span>The
dschulze@281 159 Mask Rendering Model</a>
dschulze@279 160 <ul class=toc>
dschulze@279 161 <li><a href="#layering"><span class=secno>5.1. </span>Layering Multiple
dschulze@279 162 Mask Images</a>
dschulze@279 163
dschulze@279 164 <li><a href="#MaskValues"><span class=secno>5.2. </span>Calculating mask
dschulze@279 165 values</a>
dschulze@279 166 </ul>
dschulze@278 167
dschulze@292 168 <li><a href="#masking"><span class=secno>6. </span>Mask</a>
dschulze@292 169 <ul class=toc>
dschulze@292 170 <li><a href="#the-mask-image"><span class=secno>6.1. </span>The ‘<code
dschulze@292 171 class=property>mask-image</code>’ property</a>
dschulze@292 172
dschulze@551 173 <li><a href="#the-mask-source-type"><span class=secno>6.2. </span>The
dschulze@551 174 ‘<code class=property>mask-source-type</code>’ property</a>
dschulze@551 175
dschulze@551 176 <li><a href="#the-mask-repeat"><span class=secno>6.3. </span>The
dschulze@292 177 ‘<code class=property>mask-repeat</code>’ property</a>
dschulze@292 178
dschulze@551 179 <li><a href="#the-mask-position"><span class=secno>6.4. </span>The
dschulze@292 180 ‘<code class=property>mask-position</code>’ property</a>
dschulze@292 181
dschulze@551 182 <li><a href="#the-mask-clip"><span class=secno>6.5. </span>The ‘<code
dschulze@292 183 class=property>mask-clip</code>’ property</a>
dschulze@292 184
dschulze@551 185 <li><a href="#the-mask-origin"><span class=secno>6.6. </span>The
dschulze@292 186 ‘<code class=property>mask-origin</code>’ property</a>
dschulze@292 187
dschulze@551 188 <li><a href="#the-mask-size"><span class=secno>6.7. </span>The ‘<code
dschulze@292 189 class=property>mask-size</code>’ property</a>
dschulze@292 190
dschulze@551 191 <li><a href="#mask-property"><span class=secno>6.8. </span>The ‘<code
dschulze@432 192 class=property>mask</code>’ property</a>
dschulze@432 193
dschulze@551 194 <li><a href="#the-mask-type"><span class=secno>6.9. </span>The ‘<code
dschulze@292 195 class=property>mask-type</code>’ property</a>
dschulze@292 196
dschulze@551 197 <li><a href="#MaskElement"><span class=secno>6.10. </span>The <span
dschulze@292 198 class=element-name>‘<code class=property>mask</code>’</span>
dschulze@292 199 element</a>
dschulze@292 200 </ul>
dschulze@292 201
dschulze@292 202 <li><a href="#mask-box-image"><span class=secno>7. </span>Mask Box
dschulze@292 203 Image</a>
dschulze@299 204 <ul class=toc>
dschulze@299 205 <li><a href="#the-mask-box-image-source"><span class=secno>7.1.
dschulze@299 206 </span>The ‘<code class=property>mask-box-image-source</code>’
dschulze@299 207 property</a>
dschulze@299 208
dschulze@299 209 <li><a href="#the-mask-box-image-slice"><span class=secno>7.2.
dschulze@299 210 </span>The ‘<code class=property>mask-box-image-slice</code>’
dschulze@299 211 property</a>
dschulze@299 212
dschulze@299 213 <li><a href="#the-mask-box-image-width"><span class=secno>7.3.
dschulze@299 214 </span>The ‘<code class=property>mask-box-image-width</code>’
dschulze@299 215 property</a>
dschulze@299 216
dschulze@299 217 <li><a href="#the-mask-box-image-outset"><span class=secno>7.4.
dschulze@299 218 </span>The ‘<code class=property>mask-box-image-outset</code>’
dschulze@299 219 property</a>
dschulze@299 220
dschulze@299 221 <li><a href="#the-mask-box-image-repeat"><span class=secno>7.5.
dschulze@299 222 </span>The ‘<code class=property>mask-box-image-repeat</code>’
dschulze@299 223 property</a>
dschulze@299 224
dschulze@299 225 <li><a href="#the-mask-box-image"><span class=secno>7.6. </span>The
dschulze@299 226 ‘<code class=property>mask-box-image</code>’ property</a>
dschulze@453 227
dschulze@453 228 <li><a href="#masking-with-the-mask-box-image"><span class=secno>7.7.
dschulze@453 229 </span>Masking with the mask-box-image</a>
dschulze@299 230 </ul>
dschulze@292 231
dschulze@298 232 <li><a href="#clipping-paths"><span class=secno>8. </span>Clipping
dschulze@298 233 paths</a>
dschulze@298 234 <ul class=toc>
dschulze@298 235 <li><a href="#the-clip-path"><span class=secno>8.1. </span>The ‘<code
dschulze@298 236 class=property>clip-path</code>’ property</a>
dschulze@298 237
dschulze@298 238 <li><a href="#the-clip-rule"><span class=secno>8.2. </span>The ‘<code
dschulze@298 239 class=property>clip-rule</code>’ property</a>
dschulze@298 240
dschulze@451 241 <li><a href="#clip-property"><span class=secno>8.3. </span>The ‘<code
dschulze@451 242 class=property>clip</code>’ property</a>
dschulze@451 243
dschulze@451 244 <li><a href="#ClipPathElement"><span class=secno>8.4. </span>The
dschulze@551 245 ‘<code class=property>clipPath</code>’ element</a>
dschulze@298 246
dschulze@451 247 <li><a href="#clipPath-geometry"><span class=secno>8.5. </span>Clipping
dschulze@298 248 paths, geometry, and pointer events</a>
dschulze@298 249 </ul>
dschulze@273 250
dschulze@473 251 <li><a href="#security"><span class=secno>9. </span>Security</a>
dschulze@473 252 <ul class=toc>
dschulze@473 253 <li><a href="#origin-restrictions"><span class=secno>9.1. </span>Origin
dschulze@473 254 Restrictions</a>
dschulze@473 255 </ul>
dschulze@473 256
dschulze@473 257 <li><a href="#DOMInterfaces"><span class=secno>10. </span>DOM
dschulze@462 258 interfaces</a>
dschulze@462 259 <ul class=toc>
dschulze@473 260 <li><a href="#InterfaceSVGClipPathElement"><span class=secno>10.1.
dschulze@462 261 </span>Interface SVGClipPathElement</a>
dschulze@462 262
dschulze@473 263 <li><a href="#InterfaceSVGMaskElement"><span class=secno>10.2.
dschulze@462 264 </span>Interface SVGMaskElement</a>
dschulze@462 265 </ul>
dschulze@462 266
dschulze@741 267 <li><a href="#conformance"><span class=secno>11. </span>Conformance</a>
dschulze@746 268 <ul class=toc>
dschulze@746 269 <li class=no-ref><a
dschulze@746 270 href="#conformance-to-css-background-and-border"><span
dschulze@746 271 class=secno>11.1. </span>Conformance to CSS Background and Borders</a>
dschulze@746 272 </ul>
dschulze@734 273
dschulze@273 274 <li class=no-num><a href="#references"> References</a>
dschulze@273 275 <ul class=toc>
dschulze@273 276 <li class=no-num><a href="#normative-references"> Normative
dschulze@273 277 references</a>
dschulze@273 278
dschulze@273 279 <li class=no-num><a href="#other-references"> Other references</a>
dschulze@273 280 </ul>
dschulze@273 281
dschulze@273 282 <li class=no-num><a href="#index"> Index</a>
dschulze@273 283
dschulze@273 284 <li class=no-num><a href="#property-index"> Property index</a>
dschulze@273 285 </ul>
dschulze@273 286 <!--end-toc-->
dschulze@273 287
dschulze@273 288 <h2 id=intro><span class=secno>1. </span> Introduction</h2>
dschulze@273 289
dschulze@454 290 <p> With CSS Masking it is possible to specify another graphics element,
dschulze@454 291 shape or file to be used as clipping region or an luminance or alpha mask
dschulze@454 292 for compositing the current object into the background.
dschulze@273 293
dschulze@551 294 <p> A mask is applied using the ‘<a href="#mask"><code
dschulze@454 295 class=property>mask</code></a>’, ‘<a href="#mask-image"><code
dschulze@454 296 class=property>mask-image</code></a>’ or ‘<a
dschulze@454 297 href="#mask-box-image0"><code class=property>mask-box-image</code></a>’
dschulze@551 298 properties. The mask source may be defined using a <a class=element-name
dschulze@551 299 href="#MaskElement">‘<code class=property>mask</code>’</a> element
dschulze@551 300 referenced by the ‘<a href="#mask"><code
dschulze@551 301 class=property>mask</code></a>’ property. Alternatively, for many simple
dschulze@551 302 uses, the ‘<a href="#mask-image"><code
dschulze@281 303 class=property>mask-image</code></a>’ property may refer directly to
dschulze@281 304 graphical elements or images to be used as mask forgoing the need for an
dschulze@551 305 explicit <a class=element-name href="#MaskElement">‘<code
dschulze@551 306 class=property>mask</code>’</a> element. The ‘<a href="#mask"><code
dschulze@551 307 class=property>mask</code></a>’ property is also a shorthand for other
dschulze@551 308 masking properties. ‘<a href="#mask-box-image0"><code
dschulze@551 309 class=property>mask-box-image</code></a>’ splits a mask image into 9
dschulze@551 310 pieces. The pieces may be sliced, scaled and stretched in various ways to
dschulze@551 311 fit the size of the mask image area.
dschulze@281 312
dschulze@281 313 <p> The effect of applying a mask is as if the mask images or mask source
dschulze@486 314 elements are rendered into an off-screen image which has been initialized
dschulze@281 315 to transparent black. The graphical object to which the mask is applied
dschulze@281 316 will be painted onto the background through the mask, thus completely or
dschulze@281 317 partially masking out parts of the graphical object.
dschulze@273 318
dschulze@454 319 <p> Clipping defines a visible region of a visual element. The region can
dschulze@551 320 be specified with SVG <a
dschulze@551 321 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@551 322 element</a> or basic shapes. Everything outside of a region does not get
dschulze@551 323 rendered.
dschulze@454 324
dschulze@273 325 <div class=example>
dschulze@311 326 <div class=figure> <img alt="Example Mask" height=260px
dschulze@311 327 src="images/luminance-mask.svg" width=655px>
dschulze@453 328 <p class=caption> A luminance mask (middle) is applied on a shape filled
dschulze@311 329 with a gradient (left). This results in a masked shape (right).
dschulze@311 330 </div>
dschulze@273 331 </div>
dschulze@273 332
dschulze@279 333 <h2 id=placement><span class=secno>2. </span>Module interactions</h2>
dschulze@279 334
dschulze@279 335 <p>This specification defines a set of CSS properties that affect the
dschulze@279 336 visual rendering of elements to which those properties are applied; these
dschulze@279 337 effects are applied after elements have been sized and positioned
dschulze@279 338 according to the <a href="http://www.w3.org/TR/CSS2/visuren.html"
dschulze@273 339 title="Visual formatting model">Visual formatting model</a> from <a
dschulze@273 340 href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>. Some values of
dschulze@273 341 these properties result in the creation of a <a
dschulze@273 342 href="http://www.w3.org/TR/CSS2/visuren.html#containing-block"
dschulze@273 343 title="Visual formatting model">containing block</a>, and/or the creation
dschulze@273 344 of a <a href="http://www.w3.org/TR/CSS2/visuren.html#z-index"
dschulze@273 345 title="Visual formatting model">stacking context</a>.
dschulze@273 346
dschulze@279 347 <h2 id=values><span class=secno>3. </span>Values</h2>
dschulze@279 348
dschulze@453 349 <p> This specification follows the <a
dschulze@279 350 href="http://www.w3.org/TR/CSS21/about.html#property-defs">CSS property
dschulze@279 351 definition conventions</a> from <a href="#CSS21"
dschulze@279 352 rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>. Value types not defined in
dschulze@731 353 this specification are defined in CSS Values and Units Module Level 3 <a
dschulze@731 354 href="#CSS3VAL" rel=biblioentry>[CSS3VAL]<!--{{!CSS3VAL}}--></a>.
dschulze@279 355
dschulze@453 356 <p> In addition to the property-specific values listed in their
dschulze@453 357 definitions, all properties defined in this specification also accept the
dschulze@453 358 <a
dschulze@279 359 href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit">inherit</a>
dschulze@279 360 keyword as their property value. For readability it has not been repeated
dschulze@279 361 explicitly.
dschulze@279 362
dschulze@746 363 <h2 id=terminology><span class=secno>4. </span>Terminology</h2>
dschulze@273 364
dschulze@273 365 <p> When used in this specification, terms have the meanings assigned in
dschulze@273 366 this section.
dschulze@273 367
dschulze@273 368 <dl>
dschulze@273 369 <dt id=TermClientBoundingRect><dfn id=bounding-client-rect>bounding client
dschulze@273 370 rect</dfn>
dschulze@273 371
dschulze@273 372 <dd>
dschulze@273 373 <p> The union of all border boxes for the element that has an associated
dschulze@273 374 CSS layout box and is not in the <code>http://www.w3.org/2000/svg</code>
dschulze@734 375 namespace and its descendant elements. Or the object bounding box <a
dschulze@273 376 href="#SVG11" rel=biblioentry>[SVG11]<!--{{!SVG11}}--></a>, if the
dschulze@273 377 element does not have an associated CSS layout box and is in the
dschulze@273 378 <code>http://www.w3.org/2000/svg</code> namespace (See <a
dschulze@273 379 href="http://www.w3.org/TR/cssom-view/#dom-element-getboundingclientrect">getBoundingClientRect</a>
dschulze@463 380 <a href="#CSSOM-VIEW"
dschulze@463 381 rel=biblioentry>[CSSOM-VIEW]<!--{{CSSOM-VIEW}}--></a>).
dschulze@273 382
dschulze@273 383 <dt id=TermLocalCoordinateSystem><dfn id=local-coordinate-system>local
dschulze@273 384 coordinate system</dfn>
dschulze@273 385
dschulze@746 386 <dt id=TermUserCoordinateSystem><dfn id=user-coordinate-system>user
dschulze@746 387 coordinate system</dfn>
dschulze@746 388
dschulze@273 389 <dd>
dschulze@273 390 <p> In general, a coordinate system defines locations and distances on
dschulze@273 391 the current canvas. The current local coordinate system (also user
dschulze@273 392 coordinate system) is the coordinate system that is currently active and
dschulze@273 393 which is used to define how coordinates and lengths are located and
dschulze@273 394 computed, respectively, on the current canvas <a href="#CSS3-TRANSFORMS"
dschulze@427 395 rel=biblioentry>[CSS3-TRANSFORMS]<!--{{CSS3-TRANSFORMS}}--></a>.
dschulze@273 396
dschulze@273 397 <p> For elements that have an associated CSS layout box, the current user
dschulze@273 398 coordinate system has its origin at the top-left corner of the <a
dschulze@273 399 class=term href="#bounding-client-rect">bounding client rect</a> and one
dschulze@273 400 unit equals one CSS pixel. The viewport for resolving percentage values
dschulze@273 401 is defined by the width and height of the <a class=term
dschulze@427 402 href="#bounding-client-rect">bounding client rect</a>.
dschulze@273 403
dschulze@273 404 <p> If the element does not have an associated CSS layout box and is in
dschulze@273 405 the <code>http://www.w3.org/2000/svg</code> namespace, the current local
dschulze@273 406 coordinate system has its origin at the top-left corner of the element's
dschulze@427 407 nearest viewport.
dschulze@273 408
dschulze@273 409 <dt id=TermObjectBoundingBoxUnits><dfn id=object-bounding-box-units>object
dschulze@273 410 bounding box units</dfn>
dschulze@273 411
dschulze@273 412 <dd> The <a class=term href="#bounding-client-rect">bounding client
dschulze@273 413 rect</a> defines the coordinate system in which to resolve values, as
dschulze@551 414 defined in <a
dschulze@551 415 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/coords.html#ObjectBoundingBoxUnits">object
dschulze@551 416 bounding box units</a> <a href="#SVG11"
dschulze@273 417 rel=biblioentry>[SVG11]<!--{{!SVG11}}--></a>.
dschulze@281 418
dschulze@551 419 <dt id=TermMask><dfn id=mask0>mask</dfn>
dschulze@281 420
dschulze@486 421 <dd> An off-screen image which has been initialized to transparent black.
dschulze@281 422 The graphical object to which the mask is applied will be painted onto
dschulze@281 423 the background through the mask, thus completely or partially masking out
dschulze@281 424 parts of the graphical object.
dschulze@281 425
dschulze@343 426 <dt id=TermMaskSource><dfn id=mask-source>mask source</dfn>
dschulze@281 427
dschulze@551 428 <dd> A mask defined by a <a class=element-name
dschulze@551 429 href="#MaskElement">‘<code class=property>mask</code>’</a> element.
dschulze@298 430
dschulze@298 431 <dt id=TermClippingPath>clipping path
dschulze@298 432
dschulze@551 433 <dd> A combination of the SVG elements <a class=element-name
dschulze@551 434 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathElement">‘<code
dschulze@551 435 class=property>path</code>’</a>, <a class=element-name
dschulze@551 436 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#TextElement">‘<code
dschulze@551 437 class=property>text</code>’</a> and <a
dschulze@551 438 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermBasicShapeElement">basic
dschulze@551 439 shapes</a> which serve as the outline of a (in the absence of
dschulze@551 440 anti-aliasing) 1-bit <a href="#TermMask">mask</a>, where everything on
dschulze@551 441 the "inside" of the outline is allowed to show through but everything on
dschulze@551 442 the outside is masked out. See ‘<a href="#clip-path"><code
dschulze@298 443 class=property>clip-path</code></a>’.
dschulze@273 444 </dl>
dschulze@273 445
dschulze@746 446 <p> Definitions of CSS properties and values in this specification are
dschulze@746 447 analogous to definitions in CSS Backgrounds and Borders <a href="#CSS3BG"
dschulze@746 448 rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a>. To avoid redundancy, this
dschulze@746 449 specification relies on descriptions and definitions of CSS Backgrounds
dschulze@746 450 and Borders. The following terms in CSS Backgrounds and Borders have the
dschulze@746 451 following meaning in this specification:
dschulze@746 452
dschulze@746 453 <table class=data id=term-matching>
dschulze@746 454 <thead>
dschulze@746 455 <tr>
dschulze@746 456 <th>Term in <a href="#CSS3BG"
dschulze@746 457 rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a>
dschulze@746 458
dschulze@746 459 <th>Term in CSS Masking
dschulze@746 460
dschulze@746 461 <tbody>
dschulze@746 462 <tr>
dschulze@746 463 <th>background images
dschulze@746 464
dschulze@746 465 <td>mask images
dschulze@746 466
dschulze@746 467 <tr>
dschulze@746 468 <th>background painting area
dschulze@746 469
dschulze@746 470 <td>mask painting area
dschulze@746 471
dschulze@746 472 <tr>
dschulze@746 473 <th>background-size
dschulze@746 474
dschulze@746 475 <td>mask-size
dschulze@746 476
dschulze@746 477 <tr>
dschulze@746 478 <th>background-position
dschulze@746 479
dschulze@746 480 <td>mask-position
dschulze@746 481
dschulze@746 482 <tr>
dschulze@746 483 <th>background positioning area
dschulze@746 484
dschulze@746 485 <td>mask positioning area
dschulze@746 486
dschulze@746 487 <tr>
dschulze@746 488 <th>border image area
dschulze@746 489
dschulze@746 490 <td>mask box image area
dschulze@746 491 </table>
dschulze@746 492
dschulze@281 493 <h2 id=the-mask-rendering-model><span class=secno>5. </span>The Mask
dschulze@279 494 Rendering Model</h2>
dschulze@279 495
dschulze@453 496 <p> The application of the ‘<a href="#clip-path"><code
dschulze@551 497 class=property>clip-path</code></a>’, ‘<a href="#mask"><code
dschulze@453 498 class=property>mask</code></a>’ or ‘<a href="#mask-image"><code
dschulze@279 499 class=property>mask-image</code></a>’ properties to an element formatted
dschulze@734 500 with the CSS box model establishes a stacking context in the same way that
dschulze@299 501 CSS ‘<code class=property>opacity</code>’ does, and all the element's
dschulze@299 502 descendants are rendered together as a group with the masking applied to
dschulze@299 503 the group as a whole.
dschulze@279 504
dschulze@551 505 <p> The ‘<a href="#mask"><code class=property>mask</code></a>’ and
dschulze@551 506 ‘<a href="#mask-image"><code class=property>mask-image</code></a>’
dschulze@734 507 properties have no effect on the geometry of any element's CSS boxes.
dschulze@279 508
dschulze@453 509 <p> The compositing model follows the SVG compositing model <a
dschulze@453 510 href="#SVG11" rel=biblioentry>[SVG11]<!--{{!SVG11}}--></a>: first any
dschulze@453 511 filter effect is applied, then any clipping, masking and opacity. These
dschulze@453 512 effects all apply after any other CSS effects such as ‘<code
dschulze@279 513 class=property>border</code>’. As per SVG, the application of ‘<a
dschulze@551 514 href="#mask"><code class=property>mask</code></a>’ or ‘<a
dschulze@279 515 href="#mask-image"><code class=property>mask-image</code></a>’ has no
dschulze@279 516 effect on hit-testing.
dschulze@279 517
dschulze@279 518 <h3 id=layering><span class=secno>5.1. </span>Layering Multiple Mask Images</h3>
dschulze@279 519
dschulze@279 520 <p>The mask of a box can have multiple <span class=index
dschulze@279 521 id=layers>layers</span>. The number of layers is determined by the number
dschulze@279 522 of comma-separated values in the ‘<a href="#mask-image"><code
dschulze@279 523 class=property>mask-image</code></a>’ property. Note that a value of
dschulze@279 524 ‘<a href="#none"><code class=property>none</code></a>’ still creates a
dschulze@698 525 layer. See <a
dschulze@698 526 href="http://www.w3.org/TR/css3-background/#layering">Layering Multiple
dschulze@698 527 Background Images</a> <a href="#CSS3BG"
dschulze@698 528 rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a>.
dschulze@698 529
dschulze@698 530 <p>The first layer is the layer closest to the user, the next one is
dschulze@698 531 painted behind the first, and so on. All mask images are transformed to
dschulze@698 532 alpha masks (if necessary) and combined by compositing on the <a
dschulze@698 533 href="#TermMask">mask</a>.
dschulze@279 534
dschulze@279 535 <h3 id=MaskValues><span class=secno>5.2. </span>Calculating mask values</h3>
dschulze@279 536
dschulze@281 537 <p> A mask may be interpreted using one of two different methods with
dschulze@281 538 regards to calculating the mask values that will be multiplied with the
dschulze@281 539 target alpha values.
dschulze@279 540
dschulze@279 541 <p> The first and simplest method of calculating the mask values is to use
dschulze@279 542 the alpha channel of the mask source. In this case the mask value at a
dschulze@279 543 given point is simply the value of the alpha channel at that point. The
dschulze@279 544 color channels do not contribute to the mask value.
dschulze@279 545
dschulze@279 546 <p> The second method of calculating the mask values is to use the
dschulze@279 547 luminance of the mask source. In this case the mask value at a given point
dschulze@279 548 is computed from the color channel values and alpha channel value using
dschulze@279 549 the following procedure.
dschulze@279 550
dschulze@279 551 <ol>
dschulze@279 552 <li>Compute a luminance value from the color channel values.
dschulze@279 553 <ul>
dschulze@279 554 <li> If the computed value of ‘<code
dschulze@551 555 class=property>color-interpolation</code>’ on the <a
dschulze@551 556 class=element-name href="#MaskElement">‘<code
dschulze@551 557 class=property>mask</code>’</a> element is ‘<code
dschulze@279 558 class=property>linearRGB</code>’, convert the original image color
dschulze@279 559 values (potentially in the sRGB color space) to the linear RGB color
dschulze@343 560 space.
dschulze@279 561
dschulze@279 562 <li>Then, using non-premultiplied RGB color values, apply the
dschulze@551 563 luminance-to-alpha coefficients (as defined in the <a
dschulze@551 564 class=element-name
dschulze@551 565 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#feColorMatrixElement">‘<code
dschulze@299 566 class=property>feColorMatrix</code>’</a> filter primitive <a
dschulze@452 567 href="#SVG11" rel=biblioentry>[SVG11]<!--{{!SVG11}}--></a>) to convert
dschulze@452 568 the RGB color values to luminance values.
dschulze@279 569 </ul>
dschulze@279 570
dschulze@279 571 <li>Multiply the computed luminance value by the corresponding alpha value
dschulze@279 572 to produce the mask value.
dschulze@279 573 </ol>
dschulze@279 574
dschulze@279 575 <p>Regardless of the method used, the procedure for calculating mask values
dschulze@279 576 assumes the content of the mask is a four-channel RGBA graphics object.
dschulze@279 577 For other types of graphics objects, special handling is required as
dschulze@279 578 follows.
dschulze@279 579
dschulze@279 580 <p>For a three-channel RGB graphics object that is used in a mask (e.g.,
dschulze@279 581 when referencing a three-channel image file), the effect is as if the
dschulze@279 582 object were converted into a four-channel RGBA image with the alpha
dschulze@279 583 channel uniformly set to 1.
dschulze@279 584
dschulze@279 585 <p>For a single-channel image that is used in a mask (e.g., when
dschulze@279 586 referencing a single-channel grayscale image file), the effect is as if
dschulze@279 587 the object were converted into a four-channel RGBA image, where the single
dschulze@279 588 channel from the referenced object is used to compute the three color
dschulze@724 589 channels and the alpha channel is uniformly set to 1.
dschulze@724 590
dschulze@724 591 <p class=note>Note that when referencing a grayscale image file, the
dschulze@724 592 transfer curve relating the encoded grayscale values to linear light
dschulze@724 593 values must be taken into account when computing the color channels.
dschulze@279 594
dschulze@551 595 <p class=note>Note that SVG <a
dschulze@551 596 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@551 597 elements</a> (e.g., <a class=element-name
dschulze@551 598 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#CircleElement">‘<code
dschulze@551 599 class=property>circle</code>’</a> or <a class=element-name
dschulze@551 600 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#TextElement">‘<code
dschulze@281 601 class=property>text</code>’</a>) are all treated as four-channel RGBA
dschulze@279 602 images for the purposes of masking operations.
dschulze@279 603
dschulze@279 604 <p>The effect of a mask is identical to what would have happened if there
dschulze@279 605 were no mask but instead the alpha channel of the given object were
dschulze@279 606 multiplied with the mask's resulting mask values.
dschulze@278 607
dschulze@292 608 <h2 id=masking><span class=secno>6. </span>Mask</h2>
dschulze@292 609
dschulze@292 610 <h3 id=the-mask-image><span class=secno>6.1. </span>The ‘<a
dschulze@292 611 href="#mask-image"><code class=property>mask-image</code></a>’ property</h3>
dschulze@274 612
dschulze@274 613 <table class=propdef>
dschulze@274 614 <tbody>
dschulze@274 615 <tr>
dschulze@274 616 <th>Name:
dschulze@274 617
dschulze@274 618 <td><dfn id=mask-image>mask-image</dfn>
dschulze@274 619
dschulze@274 620 <tr>
dschulze@274 621 <th><a href="#values">Value</a>:
dschulze@274 622
dschulze@607 623 <td><a href="#ltmask-referencegt"><var>&lt;mask-reference&gt;</var></a>
dschulze@274 624
dschulze@274 625 <tr>
dschulze@274 626 <th>Initial:
dschulze@274 627
dschulze@274 628 <td>none
dschulze@274 629
dschulze@274 630 <tr>
dschulze@274 631 <th>Applies to:
dschulze@274 632
dschulze@551 633 <td>All elements. In SVG, it applies to <a
dschulze@551 634 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermContainerElement">container
dschulze@551 635 elements</a> and <a
dschulze@551 636 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@551 637 elements</a>
dschulze@274 638
dschulze@274 639 <tr>
dschulze@274 640 <th>Inherited:
dschulze@274 641
dschulze@274 642 <td>no
dschulze@274 643
dschulze@274 644 <tr>
dschulze@274 645 <th>Percentages:
dschulze@274 646
dschulze@274 647 <td>N/A
dschulze@274 648
dschulze@274 649 <tr>
dschulze@274 650 <th>Media:
dschulze@274 651
dschulze@274 652 <td>visual
dschulze@274 653
dschulze@274 654 <tr>
dschulze@274 655 <th>Computed value:
dschulze@274 656
dschulze@274 657 <td>as specified, but with URIs made absolute
dschulze@274 658
dschulze@274 659 <tr>
dschulze@274 660 <th>Animatable:
dschulze@274 661
dschulze@274 662 <td>no
dschulze@274 663 </table>
dschulze@274 664
dschulze@536 665 <p>This property sets the mask image(s) or the mask source of an element.
dschulze@536 666 Images are drawn with the first specified one on top (closest to the user)
dschulze@536 667 and each subsequent image behind the previous one. Where:
dschulze@274 668
birtles@287 669 <pre class=prod><var><dfn
dschulze@551 670 id=ltmask-referencegt>&lt;mask-reference&gt;</dfn></var> = <a
dschulze@607 671 href="#ltmask-imagegt"><var>&lt;mask-image&gt;</var></a># | <a
dschulze@607 672 href="#ltmask-elementgt"><var>&lt;mask-element&gt;</var></a></pre>
dschulze@536 673
dschulze@536 674 <pre class=prod><var><dfn
dschulze@536 675 id=ltmask-imagegt>&lt;mask-image&gt;</dfn></var> = <a
dschulze@536 676 href="#ltimagegt"><var>&lt;image&gt;</var></a> | none </pre>
dschulze@536 677
dschulze@536 678 <pre class=prod><var><dfn
dschulze@607 679 id=ltmask-elementgt>&lt;mask-element&gt;</dfn></var> = <a
birtles@697 680 href="#lturlgt"><var>&lt;url&gt;</var></a> | <var>child</var> | <a
birtles@697 681 href="#ltchild-selectorgt"><var>&lt;child-selector&gt;</var></a></pre>
dschulze@536 682
dschulze@536 683 <pre class=prod><dfn
dschulze@536 684 id=ltchild-selectorgt>&lt;child-selector&gt;</dfn> = select(<a
dschulze@536 685 href="#ltcompound-selectorgt"><var>&lt;compound-selector&gt;</var></a>#)</pre>
dschulze@536 686
dschulze@536 687 <p class=note>A <a
dschulze@607 688 href="#ltmask-elementgt"><var>&lt;mask-element&gt;</var></a> can just be
dschulze@536 689 specified as a single value and can not contibute to a list of <a
dschulze@536 690 href="#ltmask-referencegt"><var>&lt;mask-reference&gt;</var></a> values.
dschulze@536 691 Otherwise the specified value of the property is invalid. (See examples
dschulze@536 692 below.)
dschulze@277 693
dschulze@277 694 <dl>
dschulze@536 695 <dt> <dfn id=lturlgt>‘<code class=css>&lt;url&gt;</code>’</dfn>
dschulze@536 696
dschulze@551 697 <dd> A URL reference to a <a class=element-name
dschulze@551 698 href="#MaskElement">‘<code class=property>mask</code>’</a> element
dschulze@731 699 (for example ‘<code class=css>url(commonmasks.svg#mask)</code>’) or
dschulze@551 700 an <a href="#ltimagegt"><var>&lt;image&gt;</var></a>.
dschulze@536 701
birtles@697 702 <dt>‘<code class=css>child</code>’
dschulze@536 703
dschulze@698 704 <dd> A keyword to indicate that the last direct sibling <a
dschulze@698 705 class=element-name href="#MaskElement">‘<code
dschulze@698 706 class=property>mask</code>’</a> element of the element the ‘<a
dschulze@698 707 href="#mask-image"><code class=property>mask-image</code></a>’ property
dschulze@698 708 is applied should be used as the mask source. It is equivalent to
dschulze@698 709 ‘<code class=css>select(mask:last-of-type)</code>’.
dschulze@536 710
birtles@697 711 <dt>‘<a href="#ltchild-selectorgt"><code
birtles@697 712 class=css>&lt;child-selector&gt;</code></a>’
dschulze@536 713
dschulze@551 714 <dd> A comma-separated list of <a
dschulze@551 715 href="http://dev.w3.org/csswg/selectors4/#compound">compound
dschulze@698 716 selector</a>s scoped at the element to which the ‘<a
dschulze@698 717 href="#mask-image"><code class=property>mask-image</code></a>’ property
dschulze@698 718 is applied. The first matching element in <a
dschulze@551 719 href="http://www.w3.org/TR/2012/WD-dom-20120405/#concept-tree-order">tree
dschulze@551 720 order</a> (as defined in <a href="#DOM"
dschulze@536 721 rel=biblioentry>[DOM]<!--{{!DOM}}--></a>) as a result of evaluating the
dschulze@536 722 list of selectors is taken as the mask source. If there are no matching
dschulze@536 723 elements the mask source is invalid.
dschulze@536 724
dschulze@536 725 <dt><dfn id=ltcompound-selectorgt>‘<code
dschulze@536 726 class=css>&lt;compound-selector&gt;</code>’</dfn>
dschulze@536 727
dschulze@551 728 <dd> A <a href="http://dev.w3.org/csswg/selectors4/#compound">compound
dschulze@551 729 selector</a> as defined in <a href="#SELECTORS4"
dschulze@536 730 rel=biblioentry>[SELECTORS4]<!--{{!SELECTORS4}}--></a>.
dschulze@536 731
dschulze@536 732 <dd>
dschulze@536 733
birtles@287 734 <dt><dfn id=ltimagegt>&lt;image&gt;</dfn>
dschulze@277 735
dschulze@277 736 <dd> A 2D image. (See <a href="#CSS3-IMAGES"
dschulze@277 737 rel=biblioentry>[CSS3-IMAGES]<!--{{!CSS3-IMAGES}}--></a>.)
dschulze@277 738
birtles@439 739 <dt><dfn id=none>‘<code class=css>none</code>’</dfn>
birtles@439 740
birtles@439 741 <dd> A value of ‘<a href="#none"><code class=css>none</code></a>’
birtles@439 742 counts as an image layer but does not mask the element.
dschulze@277 743 </dl>
dschulze@277 744
dschulze@536 745 <p class=note>If the URI in the ‘<code class=css>url()</code>’ function
dschulze@536 746 has a fragment identifier, the <a
dschulze@536 747 href="#ltmask-referencegt"><var>&lt;mask-reference&gt;</var></a> is
dschulze@615 748 treated as <a
dschulze@615 749 href="#ltmask-elementgt"><var>&lt;mask-element&gt;</var></a>, otherwise as
dschulze@615 750 <a href="#ltmask-imagegt"><var>&lt;mask-image&gt;</var></a>.
dschulze@536 751
dschulze@552 752 <p>An invalid or non-existent mask source is ignored and no masking is
dschulze@552 753 applied.
dschulze@552 754
dschulze@552 755 <p>A mask image that is empty (zero width or zero height), that fails to
dschulze@552 756 download, is non-existent, or that cannot be displayed (e.g. because it is
dschulze@552 757 not in a supported image format) is ignored. No masking is applied.
dschulze@552 758
dschulze@552 759 <p>See the section <a href="#layering">“Layering multiple mask
dschulze@552 760 images”</a> for how ‘<a href="#mask-image"><code
dschulze@552 761 class=property>mask-image</code></a>’ interacts with other
dschulze@552 762 comma-separated mask properties to form each mask image layer.
dschulze@552 763
dschulze@552 764 <div class=example>
dschulze@552 765 <p>Some examples specifying mask images:
dschulze@552 766
dschulze@552 767 <pre>
dschulze@552 768 body { mask-image: linear-gradient(black 0%, transparent 100%) }
dschulze@552 769 p { mask-image: none }
dschulze@552 770 div { mask-image: url(tl.png), url(tr.png) }
dschulze@552 771 </pre>
dschulze@552 772
dschulze@552 773 <p>Some examples of a specified mask source:
dschulze@552 774
dschulze@552 775 <pre>
dschulze@552 776 img { mask-image: url(#mask) }
dschulze@552 777 span { mask-image: url(resources.svg#mask2) }
dschulze@552 778 </pre>
dschulze@552 779
dschulze@552 780 <p>Examples of <i>invalid</i> mask source usages:
dschulze@552 781
dschulze@552 782 <pre>
dschulze@552 783 p { mask-image: url(#mask), url(tl.png) }
dschulze@552 784 img { mask-image: url(#mask), url(resources.svg#mask2) }
dschulze@552 785 </pre>
dschulze@552 786
dschulze@615 787 <p>A <a href="#ltmask-elementgt"><var>&lt;mask-element&gt;</var></a> value
dschulze@615 788 that is either used together with another <a
dschulze@615 789 href="#ltmask-elementgt"><var>&lt;mask-element&gt;</var></a> value or an
dschulze@615 790 <a href="#ltmask-imagegt"><var>&lt;mask-image&gt;</var></a> value makes
dschulze@615 791 the whole specified ‘<a href="#mask-image"><code
dschulze@552 792 class=property>mask-image</code></a>’ value list invalid.
dschulze@552 793 </div>
dschulze@552 794
dschulze@552 795 <h3 id=the-mask-source-type><span class=secno>6.2. </span>The ‘<a
dschulze@552 796 href="#mask-source-type"><code
dschulze@552 797 class=property>mask-source-type</code></a>’ property</h3>
dschulze@552 798
dschulze@552 799 <table class=propdef>
dschulze@552 800 <tbody>
dschulze@552 801 <tr>
dschulze@552 802 <th>Name:
dschulze@552 803
dschulze@552 804 <td><dfn id=mask-source-type>mask-source-type</dfn>
dschulze@552 805
dschulze@552 806 <tr>
dschulze@552 807 <th><a href="#values">Value</a>:
dschulze@552 808
dschulze@552 809 <td><a href="#ltsource-typegt"><var>&lt;source-type&gt;</var></a>#
dschulze@552 810
dschulze@552 811 <tr>
dschulze@552 812 <th>Initial:
dschulze@552 813
dschulze@552 814 <td>auto
dschulze@552 815
dschulze@552 816 <tr>
dschulze@552 817 <th>Applies to:
dschulze@552 818
dschulze@552 819 <td>All elements. In SVG, it applies to <a
dschulze@552 820 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermContainerElement">container
dschulze@552 821 elements</a> and <a
dschulze@552 822 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@552 823 elements</a>
dschulze@552 824
dschulze@552 825 <tr>
dschulze@552 826 <th>Inherited:
dschulze@552 827
dschulze@552 828 <td>no
dschulze@552 829
dschulze@552 830 <tr>
dschulze@552 831 <th>Percentages:
dschulze@552 832
dschulze@552 833 <td>N/A
dschulze@552 834
dschulze@552 835 <tr>
dschulze@552 836 <th>Media:
dschulze@552 837
dschulze@552 838 <td>visual
dschulze@552 839
dschulze@552 840 <tr>
dschulze@552 841 <th>Computed value:
dschulze@552 842
dschulze@552 843 <td>as specified
dschulze@552 844
dschulze@552 845 <tr>
dschulze@552 846 <th>Animatable:
dschulze@552 847
dschulze@731 848 <td>no
dschulze@552 849 </table>
dschulze@552 850
dschulze@552 851 <p>The ‘<a href="#mask-source-type"><code
dschulze@552 852 class=property>mask-source-type</code></a>’ property indicates whether
dschulze@552 853 the <a href="#ltmask-referencegt"><var>&lt;mask-reference&gt;</var></a> is
dschulze@552 854 treated as luminance mask or alpha mask. (See <a
dschulze@552 855 href="#MaskValues">Calculating mask values</a>.)
dschulze@552 856
dschulze@552 857 <pre class=prod><dfn
dschulze@552 858 id=ltsource-typegt><var>&lt;source-type&gt;</var></dfn> = alpha | luminance | auto</pre>
dschulze@552 859
dschulze@552 860 <p>Values have the following meanings:
dschulze@552 861
dschulze@552 862 <dl>
dschulze@552 863 <dt><dfn id=alpha>‘<code class=css>alpha</code>’</dfn>
dschulze@552 864
dschulze@552 865 <dd> A value of ‘<a href="#alpha"><code class=css>alpha</code></a>’
dschulze@552 866 indicates that the alpha values of the mask image should be used as the
dschulze@552 867 mask values. See <a href="#MaskValues">Calculating mask values</a>.
dschulze@552 868
dschulze@552 869 <dt><dfn id=luminance>‘<code class=css>luminance</code>’</dfn>
dschulze@552 870
dschulze@552 871 <dd> A value of ‘<a href="#luminance"><code
dschulze@552 872 class=css>luminance</code></a>’ indicates that the luminance values of
dschulze@552 873 the mask image should be used as the mask values. See <a
dschulze@552 874 href="#MaskValues">Calculating mask values</a>.
dschulze@552 875
dschulze@552 876 <dt><dfn id=auto>‘<code class=css>auto</code>’</dfn>
dschulze@552 877
dschulze@552 878 <dd>
dschulze@552 879 <p> If the <a
dschulze@552 880 href="#ltmask-referencegt"><var>&lt;mask-reference&gt;</var></a> of the
dschulze@552 881 ‘<a href="#mask-image"><code class=property>mask-image</code></a>’
dschulze@552 882 property is of type <a
dschulze@552 883 href="#ltmask-imagegt"><var>&lt;mask-image&gt;</var></a> the luminance
dschulze@552 884 values of the mask image should be used as the mask values.
dschulze@552 885
dschulze@552 886 <p> If the <a
dschulze@552 887 href="#ltmask-referencegt"><var>&lt;mask-reference&gt;</var></a> of the
dschulze@552 888 ‘<a href="#mask-image"><code class=property>mask-image</code></a>’
dschulze@615 889 property is of type <a
dschulze@615 890 href="#ltmask-elementgt"><var>&lt;mask-element&gt;</var></a> the alpha
dschulze@615 891 values of the mask image should be used as the mask values.
dschulze@552 892 </dl>
dschulze@536 893
dschulze@536 894 <div class=example>
dschulze@536 895 <p> In the following example, the ‘<a href="#mask-type"><code
dschulze@536 896 class=property>mask-type</code></a>’ property sets the mask type value
dschulze@551 897 for the <a class=element-name href="#MaskElement">‘<code
dschulze@551 898 class=property>mask</code>’</a> element to ‘<a href="#alpha"><code
dschulze@552 899 class=css>alpha</code></a>’. The ‘<a href="#mask-image"><code
dschulze@552 900 class=property>mask-image</code></a>’ property has a reference to this
dschulze@552 901 <a class=element-name href="#MaskElement">‘<code
dschulze@552 902 class=property>mask</code>’</a> element and the ‘<a
dschulze@552 903 href="#mask-source-type"><code
dschulze@552 904 class=property>mask-source-type</code></a>’ property has a value of
dschulze@552 905 ‘<a href="#luminance"><code class=css>luminance</code></a>’. The
dschulze@552 906 ‘<a href="#mask-source-type"><code
dschulze@552 907 class=property>mask-source-type</code></a>’ property will override the
dschulze@552 908 definition of ‘<a href="#mask-type"><code
dschulze@551 909 class=property>mask-type</code></a>’ to ‘<a href="#luminance"><code
dschulze@551 910 class=css>luminance</code></a>’.
dschulze@536 911
dschulze@536 912 <pre>
dschulze@536 913 &lt;mask id="SVGMask" mask-type="alpha" maskContentUnits="objectBoundingBox"&gt;
dschulze@536 914 &lt;radialGradient id="radialFill"&gt;
dschulze@536 915 &lt;stop stop-color="white" offset="0"/&gt;
dschulze@536 916 &lt;stop stop-color="black" offset="1"/&gt;
dschulze@536 917 &lt;/radialGradient&gt;
dschulze@536 918 &lt;circle fill="url(#radialFill)" cx="0.5" cy="0.5" r="0.5"/&gt;
dschulze@536 919 &lt;/mask&gt;
dschulze@536 920
dschulze@552 921 &lt;style&gt;
dschulze@552 922 rect {
dschulze@552 923 mask-image: url(#SVGMask);
dschulze@552 924 mask-source-type: luminance;
dschulze@552 925 }
dschulze@552 926 &lt;/style&gt;
dschulze@552 927
dschulze@552 928 &lt;rect width="200" height="200" fill="green"/&gt;
dschulze@536 929 </pre>
dschulze@536 930 </div>
dschulze@536 931
dschulze@551 932 <h3 id=the-mask-repeat><span class=secno>6.3. </span>The ‘<a
dschulze@551 933 href="#mask-repeat"><code class=property>mask-repeat</code></a>’
dschulze@551 934 property</h3>
dschulze@551 935
dschulze@551 936 <table class=propdef>
dschulze@551 937 <tbody>
dschulze@551 938 <tr>
dschulze@551 939 <th>Name:
dschulze@551 940
dschulze@551 941 <td><dfn id=mask-repeat>mask-repeat</dfn>
dschulze@551 942
dschulze@551 943 <tr>
dschulze@551 944 <th><a href="#values">Value</a>:
dschulze@551 945
dschulze@551 946 <td><a href="#ltrepeat-stylegt"><var>&lt;repeat-style&gt;</var></a>#
dschulze@551 947
dschulze@551 948 <tr>
dschulze@551 949 <th>Initial:
dschulze@551 950
dschulze@551 951 <td>repeat
dschulze@551 952
dschulze@551 953 <tr>
dschulze@551 954 <th>Applies to:
dschulze@551 955
dschulze@551 956 <td>All elements. In SVG, it applies to <a
dschulze@551 957 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermContainerElement">container
dschulze@551 958 elements</a> and <a
dschulze@551 959 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@551 960 elements</a>
dschulze@274 961
dschulze@274 962 <tr>
dschulze@274 963 <th>Inherited:
dschulze@274 964
dschulze@274 965 <td>no
dschulze@274 966
dschulze@274 967 <tr>
dschulze@274 968 <th>Percentages:
dschulze@274 969
dschulze@274 970 <td>N/A
dschulze@274 971
dschulze@274 972 <tr>
dschulze@274 973 <th>Media:
dschulze@274 974
dschulze@274 975 <td>visual
dschulze@274 976
dschulze@274 977 <tr>
dschulze@274 978 <th>Computed value:
dschulze@274 979
dschulze@274 980 <td>A list, each item consisting of: two keywords, one per dimension
dschulze@274 981
dschulze@274 982 <tr>
dschulze@274 983 <th>Animatable:
dschulze@274 984
dschulze@274 985 <td>no
dschulze@274 986 </table>
dschulze@274 987
dschulze@274 988 <p>Specifies how mask images are tiled after they have been <a
dschulze@274 989 href="#the-mask-size">sized</a> and <a
dschulze@274 990 href="#the-mask-position">positioned</a>. Where
dschulze@274 991
dschulze@274 992 <pre class=prod><dfn
dschulze@274 993 id=ltrepeat-stylegt><var>&lt;repeat-style&gt;</var></dfn> = repeat-x | repeat-y | [repeat | space | round | no-repeat]{1,2}</pre>
dschulze@274 994
dschulze@659 995 <p>See <a
dschulze@659 996 href="http://www.w3.org/TR/css3-background/#the-background-repeat">Tiling
dschulze@659 997 Images: the ‘<code class=property>background-repeat</code>’
dschulze@659 998 property</a> <a href="#CSS3BG"
dschulze@746 999 rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a> for the definitions of the
dschulze@659 1000 property values.
dschulze@274 1001
dschulze@282 1002 <div class=example>
dschulze@282 1003 <p style="display:none">Example(s):
dschulze@282 1004
dschulze@470 1005 <pre>
dschulze@470 1006 body {
dschulze@470 1007 background-color: blue;
dschulze@470 1008 mask-image: url(dot-mask.png) luminance;
dschulze@470 1009 mask-repeat: space;
dschulze@470 1010 }
dschulze@282 1011 </pre>
dschulze@282 1012
dschulze@282 1013 <div class=figure>
dschulze@282 1014 <p><img alt="Image of an element with a dotted mask."
dschulze@282 1015 src="images/mask-repeat.svg" style="border: solid black 1px;" width=240>
dschulze@282 1016
dschulze@282 1017 <p class=caption>The effect of ‘<code class=property>space</code>’:
dschulze@282 1018 the mask image of a dot is tiled to cover the whole <a class=index
dschulze@659 1019 href="#mask-painting-area" id=mask-painting-area0>mask painting area</a>
dschulze@282 1020 and the mask images are equally spaced.
dschulze@282 1021 </div>
dschulze@282 1022 </div>
dschulze@282 1023
dschulze@274 1024 <p>See the section <a href="#layering">“Layering multiple mask
dschulze@277 1025 images”</a> for how ‘<a href="#mask-repeat"><code
dschulze@277 1026 class=property>mask-repeat</code></a>’ interacts with other
dschulze@274 1027 comma-separated mask properties to form each mask image layer.
dschulze@274 1028
dschulze@551 1029 <h3 id=the-mask-position><span class=secno>6.4. </span>The ‘<a
dschulze@402 1030 href="#mask-position"><code class=property>mask-position</code></a>’
dschulze@292 1031 property</h3>
dschulze@274 1032
dschulze@274 1033 <table class=propdef>
dschulze@274 1034 <tbody>
dschulze@274 1035 <tr>
dschulze@274 1036 <th>Name:
dschulze@274 1037
dschulze@402 1038 <td><dfn id=mask-position>mask-position</dfn>
dschulze@274 1039
dschulze@274 1040 <tr>
dschulze@274 1041 <th><a href="#values">Value</a>:
dschulze@274 1042
dschulze@402 1043 <td><a href="#ltpositiongt"><var>&lt;position&gt;</var></a>#
dschulze@274 1044
dschulze@274 1045 <tr>
dschulze@274 1046 <th>Initial:
dschulze@274 1047
dschulze@402 1048 <td>0% 0%
dschulze@274 1049
dschulze@274 1050 <tr>
dschulze@274 1051 <th>Applies to:
dschulze@274 1052
dschulze@551 1053 <td>All elements. In SVG, it applies to <a
dschulze@551 1054 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermContainerElement">container
dschulze@551 1055 elements</a> and <a
dschulze@551 1056 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@551 1057 elements</a>
dschulze@274 1058
dschulze@274 1059 <tr>
dschulze@274 1060 <th>Inherited:
dschulze@274 1061
dschulze@274 1062 <td>no
dschulze@274 1063
dschulze@274 1064 <tr>
dschulze@274 1065 <th>Percentages:
dschulze@274 1066
dschulze@274 1067 <td>refer to size of <a class=index href="#mask-painting-area"
dschulze@659 1068 id=mask-painting-area1>mask painting area</a> <em>minus</em> size of
dschulze@274 1069 mask image; see text
dschulze@274 1070
dschulze@274 1071 <tr>
dschulze@274 1072 <th>Media:
dschulze@274 1073
dschulze@274 1074 <td>visual
dschulze@274 1075
dschulze@274 1076 <tr>
dschulze@274 1077 <th>Computed value:
dschulze@274 1078
dschulze@274 1079 <td>A list, each item consisting of: two keywords representing the
dschulze@274 1080 origin and two offsets from that origin, each given as an absolute
dschulze@274 1081 length (if given a &lt;length&gt;), otherwise as a percentage.
dschulze@274 1082
dschulze@274 1083 <tr>
dschulze@274 1084 <th>Animatable:
dschulze@274 1085
dschulze@731 1086 <td>as <a
dschulze@731 1087 href="http://dev.w3.org/csswg/css3-transitions/#animtype-repeatable-list">repeatable
dschulze@731 1088 list</a> of <a
dschulze@731 1089 href="http://dev.w3.org/csswg/css3-transitions/#animtype-simple-list">simple
dschulze@731 1090 list</a> of <a
dschulze@731 1091 href="http://dev.w3.org/csswg/css3-transitions/#animtype-lpcalc">length,
dschulze@731 1092 percentage, or calc</a>
dschulze@274 1093 </table>
dschulze@274 1094
dschulze@274 1095 <p>Where
dschulze@274 1096
dschulze@470 1097 <pre class=prod><dfn id=ltpositiongt><var>&lt;position&gt;</var></dfn> = [
dschulze@470 1098 [ left | center | right | top | bottom | <var>&lt;percentage&gt;</var> | <var>&lt;length&gt;</var> ]
dschulze@470 1099 |
dschulze@470 1100 [ left | center | right | <var>&lt;percentage&gt;</var> | <var>&lt;length&gt;</var> ]
dschulze@470 1101 [ top | center | bottom | <var>&lt;percentage&gt;</var> | <var>&lt;length&gt;</var> ]
dschulze@470 1102 |
dschulze@470 1103 [ center | [ left | right ] [ <var>&lt;percentage&gt;</var> | <var>&lt;length&gt;</var> ]? ] &amp;&amp;
dschulze@470 1104 [ center | [ top | bottom ] [ <var>&lt;percentage&gt;</var> | <var>&lt;length&gt;</var> ]? ]
dschulze@274 1105 ]</pre>
dschulze@274 1106
dschulze@659 1107 <p>See <a
dschulze@659 1108 href="http://www.w3.org/TR/css3-background/#the-background-position">Positioning
dschulze@659 1109 Images: the ‘<code class=property>background-position</code>’
dschulze@659 1110 property</a> <a href="#CSS3BG"
dschulze@746 1111 rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a> for the definitions of the
dschulze@659 1112 property values.
dschulze@274 1113
dschulze@274 1114 <div class=example>
dschulze@274 1115 <p>In the example below, the (single) image is placed in the lower-right
dschulze@274 1116 corner of the viewport.
dschulze@274 1117
dschulze@470 1118 <pre>
dschulze@470 1119 body {
dschulze@470 1120 mask-image: url("logo.png");
dschulze@470 1121 mask-position: 100% 100%;
dschulze@470 1122 mask-repeat: no-repeat;
dschulze@470 1123 }
dschulze@274 1124 </pre>
dschulze@274 1125 </div>
dschulze@274 1126
dschulze@274 1127 <div class=example>
dschulze@274 1128 <p>Mask positions can also be relative to other corners than the top left.
dschulze@274 1129 E.g., the following puts the background image 10px from the bottom and
dschulze@274 1130 3em from the right:
dschulze@274 1131
dschulze@274 1132 <pre>mask-position: right 3em bottom 10px</pre>
dschulze@274 1133 </div>
dschulze@274 1134
dschulze@274 1135 <p>See the section <a href="#layering">“Layering multiple mask
dschulze@277 1136 images”</a> for how ‘<a href="#mask-position"><code
dschulze@277 1137 class=property>mask-position</code></a>’ interacts with other
dschulze@274 1138 comma-separated mask properties to form each mask image layer.
dschulze@274 1139
dschulze@551 1140 <h3 id=the-mask-clip><span class=secno>6.5. </span>The ‘<a
dschulze@292 1141 href="#mask-clip"><code class=property>mask-clip</code></a>’ property</h3>
dschulze@274 1142
dschulze@274 1143 <table class=propdef>
dschulze@274 1144 <tbody>
dschulze@274 1145 <tr>
dschulze@274 1146 <th>Name:
dschulze@274 1147
dschulze@274 1148 <td><dfn id=mask-clip>mask-clip</dfn>
dschulze@274 1149
dschulze@274 1150 <tr>
dschulze@274 1151 <th><a href="#values">Value</a>:
dschulze@274 1152
dschulze@615 1153 <td><a href="#ltclip-boxgt"><var>&lt;clip-box&gt;</var></a>#
dschulze@274 1154
dschulze@274 1155 <tr>
dschulze@274 1156 <th>Initial:
dschulze@274 1157
dschulze@274 1158 <td>border-box
dschulze@274 1159
dschulze@274 1160 <tr>
dschulze@274 1161 <th>Applies to:
dschulze@274 1162
dschulze@551 1163 <td>All elements. In SVG, it applies to <a
dschulze@551 1164 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermContainerElement">container
dschulze@551 1165 elements</a> and <a
dschulze@551 1166 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@551 1167 elements</a>
dschulze@274 1168
dschulze@274 1169 <tr>
dschulze@274 1170 <th>Inherited:
dschulze@274 1171
dschulze@274 1172 <td>no
dschulze@274 1173
dschulze@274 1174 <tr>
dschulze@274 1175 <th>Percentages:
dschulze@274 1176
dschulze@274 1177 <td>N/A
dschulze@274 1178
dschulze@274 1179 <tr>
dschulze@274 1180 <th>Media:
dschulze@274 1181
dschulze@274 1182 <td>visual
dschulze@274 1183
dschulze@274 1184 <tr>
dschulze@274 1185 <th>Computed value:
dschulze@274 1186
dschulze@274 1187 <td>as specified
dschulze@274 1188
dschulze@274 1189 <tr>
dschulze@274 1190 <th>Animatable:
dschulze@274 1191
dschulze@274 1192 <td>no
dschulze@274 1193 </table>
dschulze@274 1194
dschulze@274 1195 <p>Determines the <dfn id=mask-painting-area>mask painting area</dfn>,
dschulze@474 1196 which determines the area that is affected by the mask. The painted
dschulze@474 1197 content of an element may be resricted to this area. The syntax of the
dschulze@274 1198 property is given with
dschulze@274 1199
dschulze@615 1200 <pre class=prod><dfn id=ltclip-boxgt><var>&lt;clip-box&gt;</var></dfn> = <a
dschulze@615 1201 href="#ltboxgt"><var>&lt;box&gt;</var></a> | no-clip</pre>
dschulze@615 1202
dschulze@274 1203 <pre class=prod><dfn
dschulze@615 1204 id=ltboxgt><var>&lt;box&gt;</var></dfn> = border-box | padding-box | content-box</pre>
dschulze@274 1205
dschulze@274 1206 <p>Values have the following meanings:
dschulze@274 1207
dschulze@274 1208 <dl>
dschulze@274 1209 <dt><dfn id=border-box title="''border-box''!!'mask-clip' value"> ‘<code
dschulze@274 1210 class=css>border-box</code>’</dfn>
dschulze@274 1211
dschulze@474 1212 <dd>The painted content is rectricted to (clipped to) the <span>border
dschulze@474 1213 box</span> respectively <span>painting box</span> for objects without
dschulze@474 1214 associated layout box.
dschulze@274 1215
dschulze@274 1216 <dt><dfn id=padding-box title="''padding-box''!!'mask-clip' value">
dschulze@274 1217 ‘<code class=css>padding-box</code>’</dfn>
dschulze@274 1218
dschulze@474 1219 <dd>The painted content is rectricted to (clipped to) the <span>padding
dschulze@474 1220 box.</span>
dschulze@274 1221
dschulze@274 1222 <dt><dfn id=content-box title="''content-box''!!'mask-clip' value">
dschulze@274 1223 ‘<code class=css>content-box</code>’</dfn>
dschulze@615 1224
dschulze@474 1225 <dd>The painted content is rectricted to (clipped to) the <span>content
dschulze@615 1226 box</span> respectively <span>object bounding box</span> <a href="#SVG11"
dschulze@615 1227 rel=biblioentry>[SVG11]<!--{{!SVG11}}--></a> for objects without
dschulze@615 1228 associated layout box.
dschulze@474 1229
dschulze@536 1230 <dt><dfn id=no-clip title="''no-clip''!!'mask-clip' value"> ‘<code
dschulze@536 1231 class=css>no-clip</code>’</dfn>
dschulze@474 1232
dschulze@474 1233 <dd>The painted content is not restricted (not clipped). The <a
dschulze@474 1234 href="#mask-painting-area">mask painting area</a> is set to the <a
dschulze@474 1235 href="#bounding-client-rect">bounding client rect</a>.
dschulze@274 1236 </dl>
dschulze@274 1237
dschulze@432 1238 <p class=note>Note that there is no corresponding box for ‘<code
dschulze@432 1239 class=css>padding-box</code>’ on objects without associated layout box
dschulze@432 1240 and ‘<a href="#content-box0"><code class=css>content-box</code></a>’
dschulze@432 1241 is choosen instead.
dschulze@274 1242
dschulze@274 1243 <p>See the section <a href="#layering">“Layering multiple mask
dschulze@277 1244 images”</a> for how ‘<a href="#mask-clip"><code
dschulze@277 1245 class=property>mask-clip</code></a>’ interacts with other
dschulze@274 1246 comma-separated mask properties to form each mask image layer.
dschulze@274 1247
dschulze@551 1248 <h3 id=the-mask-origin><span class=secno>6.6. </span>The ‘<a
dschulze@276 1249 href="#mask-origin"><code class=property>mask-origin</code></a>’
dschulze@292 1250 property</h3>
dschulze@275 1251
dschulze@275 1252 <table class=propdef>
dschulze@275 1253 <tbody>
dschulze@275 1254 <tr>
dschulze@275 1255 <th>Name:
dschulze@275 1256
dschulze@276 1257 <td><dfn id=mask-origin>mask-origin</dfn>
dschulze@275 1258
dschulze@275 1259 <tr>
dschulze@275 1260 <th><a href="#values">Value</a>:
dschulze@275 1261
dschulze@280 1262 <td><a href="#ltboxgt"><var>&lt;box&gt;</var></a>#
dschulze@275 1263
dschulze@275 1264 <tr>
dschulze@275 1265 <th>Initial:
dschulze@275 1266
dschulze@275 1267 <td>padding-box
dschulze@275 1268
dschulze@275 1269 <tr>
dschulze@275 1270 <th>Applies to:
dschulze@275 1271
dschulze@551 1272 <td>All elements. In SVG, it applies to <a
dschulze@551 1273 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermContainerElement">container
dschulze@551 1274 elements</a> and <a
dschulze@551 1275 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@551 1276 elements</a>
dschulze@275 1277
dschulze@275 1278 <tr>
dschulze@275 1279 <th>Inherited:
dschulze@275 1280
dschulze@275 1281 <td>no
dschulze@275 1282
dschulze@275 1283 <tr>
dschulze@275 1284 <th>Percentages:
dschulze@275 1285
dschulze@275 1286 <td>N/A
dschulze@275 1287
dschulze@275 1288 <tr>
dschulze@275 1289 <th>Media:
dschulze@275 1290
dschulze@275 1291 <td>visual
dschulze@275 1292
dschulze@275 1293 <tr>
dschulze@275 1294 <th>Computed value:
dschulze@275 1295
dschulze@275 1296 <td>as specified
dschulze@275 1297
dschulze@275 1298 <tr>
dschulze@275 1299 <th>Animatable:
dschulze@275 1300
dschulze@275 1301 <td>no
dschulze@275 1302 </table>
dschulze@275 1303
dschulze@275 1304 <p>For elements rendered as a single box, specifies the <dfn
dschulze@275 1305 id=mask-positioning-area>mask positioning area</dfn>. For elements
dschulze@275 1306 rendered as multiple boxes (e.g., inline boxes on several lines, boxes on
dschulze@275 1307 several pages) specifies which boxes ‘<code
dschulze@275 1308 class=property>box-decoration-break</code>’ operates on to determine the
dschulze@275 1309 mask positioning area(s).
dschulze@275 1310
dschulze@275 1311 <dl>
dschulze@275 1312 <dt><dfn id=padding-box0 title="''padding-box''!!'mask-origin' value">
dschulze@275 1313 ‘<code class=css>padding-box</code>’</dfn>
dschulze@275 1314
dschulze@275 1315 <dd>The position is relative to the padding box. (For single boxes
dschulze@275 1316 ‘<code class=css>0 0</code>’ is the upper left corner of the padding
dschulze@275 1317 edge, ‘<code class=css>100% 100%</code>’ is the lower right corner.)
dschulze@275 1318
dschulze@275 1319 <dt><dfn id=border-box0 title="''border-box''!!'mask-origin' value">
dschulze@275 1320 ‘<code class=css>border-box</code>’</dfn>
dschulze@275 1321
dschulze@432 1322 <dd>The position is relative to the border box respectively <span>painting
dschulze@432 1323 box</span> for objects without associated layout box.
dschulze@275 1324
dschulze@275 1325 <dt><dfn id=content-box0>‘<code class=css>content-box</code>’</dfn>
dschulze@275 1326
dschulze@432 1327 <dd>The position is relative to the content box respectively object
dschulze@432 1328 bounding box <a href="#SVG11"
dschulze@432 1329 rel=biblioentry>[SVG11]<!--{{!SVG11}}--></a> for objects without
dschulze@432 1330 associated layout box.
dschulze@275 1331 </dl>
dschulze@275 1332
dschulze@432 1333 <p class=note>Note that there is no corresponding box for ‘<code
dschulze@432 1334 class=css>padding-box</code>’ on objects without associated layout box
dschulze@432 1335 and ‘<a href="#content-box0"><code class=css>content-box</code></a>’
dschulze@432 1336 is choosen instead.
dschulze@432 1337
dschulze@275 1338 <p class=note>Note that if ‘<a href="#mask-clip"><code
dschulze@275 1339 class=property>mask-clip</code></a>’ is ‘<code
dschulze@276 1340 class=css>padding-box</code>’, ‘<a href="#mask-origin"><code
dschulze@276 1341 class=property>mask-origin</code></a>’ is ‘<code
dschulze@275 1342 class=css>border-box</code>’, ‘<a href="#mask-position"><code
dschulze@275 1343 class=property>mask-position</code></a>’ is ‘<code class=css>top
dschulze@275 1344 left</code>’ (the initial value), and the element has a non-zero border,
dschulze@275 1345 then the top and left of the mask image will be clipped.
dschulze@275 1346
dschulze@275 1347 <p>See the section <a href="#layering">“Layering multiple mask
dschulze@277 1348 images”</a> for how ‘<a href="#mask-origin"><code
dschulze@277 1349 class=property>mask-origin</code></a>’ interacts with other
dschulze@275 1350 comma-separated mask properties to form each mask image layer.
dschulze@275 1351
dschulze@551 1352 <h3 id=the-mask-size><span class=secno>6.7. </span>The ‘<a
dschulze@292 1353 href="#mask-size"><code class=property>mask-size</code></a>’ property</h3>
dschulze@273 1354
dschulze@273 1355 <table class=propdef>
dschulze@273 1356 <tbody>
dschulze@273 1357 <tr>
dschulze@273 1358 <th>Name:
dschulze@273 1359
dschulze@277 1360 <td><dfn id=mask-size>mask-size</dfn>
dschulze@273 1361
dschulze@273 1362 <tr>
dschulze@277 1363 <th><a href="#values">Value</a>:
dschulze@277 1364
dschulze@280 1365 <td><a href="#ltmask-sizegt"><var>&lt;mask-size&gt;</var></a>#
dschulze@273 1366
dschulze@273 1367 <tr>
dschulze@273 1368 <th>Initial:
dschulze@273 1369
dschulze@277 1370 <td>auto
dschulze@273 1371
dschulze@273 1372 <tr>
dschulze@273 1373 <th>Applies to:
dschulze@273 1374
dschulze@551 1375 <td>All elements. In SVG, it applies to <a
dschulze@551 1376 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermContainerElement">container
dschulze@551 1377 elements</a> and <a
dschulze@551 1378 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@551 1379 elements</a>
dschulze@273 1380
dschulze@273 1381 <tr>
dschulze@273 1382 <th>Inherited:
dschulze@273 1383
dschulze@273 1384 <td>no
dschulze@273 1385
dschulze@273 1386 <tr>
dschulze@273 1387 <th>Percentages:
dschulze@273 1388
dschulze@277 1389 <td>see text
dschulze@273 1390
dschulze@273 1391 <tr>
dschulze@273 1392 <th>Media:
dschulze@273 1393
dschulze@273 1394 <td>visual
dschulze@273 1395
dschulze@273 1396 <tr>
dschulze@277 1397 <th>Computed value:
dschulze@277 1398
dschulze@277 1399 <td>as specified, but with lengths made absolute
dschulze@277 1400
dschulze@277 1401 <tr>
dschulze@277 1402 <th>Animatable:
dschulze@277 1403
dschulze@731 1404 <td>as <a
dschulze@731 1405 href="http://dev.w3.org/csswg/css3-transitions/#animtype-repeatable-list">repeatable
dschulze@731 1406 list</a> of <a
dschulze@731 1407 href="http://dev.w3.org/csswg/css3-transitions/#animtype-simple-list">simple
dschulze@731 1408 list</a> of <a
dschulze@731 1409 href="http://dev.w3.org/csswg/css3-transitions/#animtype-lpcalc">length,
dschulze@731 1410 percentage, or calc</a> (<span class=note>This means keyword values are
dschulze@731 1411 not animatable.</span>)
dschulze@277 1412 </table>
dschulze@277 1413
dschulze@277 1414 <p>Specifies the size of the mask images. Where
dschulze@277 1415
dschulze@277 1416 <pre class=prod><dfn
dschulze@277 1417 id=ltmask-sizegt><var>&lt;mask-size&gt;</var></dfn> = [ <var>&lt;length&gt;</var> | <var>&lt;percentage&gt;</var> | auto ]{1,2} | cover | contain</pre>
dschulze@277 1418
dschulze@659 1419 <p>See <a
dschulze@659 1420 href="http://www.w3.org/TR/css3-background/#the-background-size">Sizing
dschulze@659 1421 Images: the ‘background-size’ property</a> <a href="#CSS3BG"
dschulze@746 1422 rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a> for the definitions of the
dschulze@659 1423 property values.
dschulze@277 1424
dschulze@277 1425 <p>See the section <a href="#layering">“Layering multiple mask
dschulze@277 1426 images”</a> for how ‘<a href="#mask-size"><code
dschulze@277 1427 class=property>mask-size</code></a>’ interacts with other
dschulze@277 1428 comma-separated mask properties to form each mask image layer.
dschulze@277 1429
dschulze@551 1430 <h3 id=mask-property><span class=secno>6.8. </span>The ‘<a
dschulze@551 1431 href="#mask"><code class=property>mask</code></a>’ property</h3>
dschulze@277 1432
dschulze@277 1433 <table class=propdef>
dschulze@277 1434 <tbody>
dschulze@277 1435 <tr>
dschulze@277 1436 <th>Name:
dschulze@277 1437
dschulze@277 1438 <td><dfn id=MaskProperty>mask</dfn>
dschulze@277 1439
dschulze@277 1440 <tr>
dschulze@277 1441 <th>Value:
dschulze@277 1442
dschulze@536 1443 <td><a href="#ltmask-layergt"><var>&lt;mask-layer&gt;</var></a>#
dschulze@277 1444
dschulze@277 1445 <tr>
dschulze@277 1446 <th>Initial:
dschulze@277 1447
dschulze@277 1448 <td>see individual properties
dschulze@277 1449
dschulze@277 1450 <tr>
dschulze@277 1451 <th>Applies to:
dschulze@277 1452
dschulze@551 1453 <td>All elements. In SVG, it applies to <a
dschulze@551 1454 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermContainerElement">container
dschulze@551 1455 elements</a> and <a
dschulze@551 1456 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@551 1457 elements</a>
dschulze@277 1458
dschulze@277 1459 <tr>
dschulze@277 1460 <th>Inherited:
dschulze@277 1461
dschulze@277 1462 <td>no
dschulze@277 1463
dschulze@277 1464 <tr>
dschulze@277 1465 <th>Percentages:
dschulze@277 1466
dschulze@277 1467 <td>see individual properties
dschulze@277 1468
dschulze@277 1469 <tr>
dschulze@277 1470 <th>Media:
dschulze@277 1471
dschulze@277 1472 <td>visual
dschulze@277 1473
dschulze@277 1474 <tr>
dschulze@551 1475 <th>Computed value:
dschulze@273 1476
dschulze@277 1477 <td>see individual properties
dschulze@273 1478
dschulze@273 1479 <tr>
birtles@440 1480 <th>Animatable:
dschulze@273 1481
dschulze@277 1482 <td>see individual properties
dschulze@273 1483 </table>
dschulze@273 1484
dschulze@277 1485 <p>Where
dschulze@277 1486
birtles@288 1487 <pre class=prod><dfn id=ltmask-layergt>&lt;mask-layer&gt;</dfn> = <a
dschulze@551 1488 href="#ltmask-referencegt"><var>&lt;mask-reference&gt;</var></a> <a
dschulze@551 1489 href="#ltsource-typegt"><var>&lt;source-type&gt;</var></a>? || <a
dschulze@536 1490 href="#ltpositiongt"><var>&lt;position&gt;</var></a> [ / <a
dschulze@536 1491 href="#ltmask-sizegt"><var>&lt;mask-size&gt;</var></a> ]? || <a
dschulze@536 1492 href="#ltrepeat-stylegt"><var>&lt;repeat-style&gt;</var></a> || <a
dschulze@615 1493 href="#ltboxgt"><var>&lt;box&gt;</var></a> || <a
dschulze@615 1494 href="#ltclip-boxgt"><var>&lt;clip-box&gt;</var></a></pre>
dschulze@615 1495
dschulze@615 1496 <p> If one <a href="#ltboxgt"><var>&lt;box&gt;</var></a> value is present
dschulze@615 1497 then it sets both ‘<a href="#mask-origin"><code
dschulze@615 1498 class=property>mask-origin</code></a>’ and ‘<a href="#mask-clip"><code
dschulze@615 1499 class=property>mask-clip</code></a>’ to that value. If two <a
dschulze@615 1500 href="#ltboxgt"><var>&lt;box&gt;</var></a> values are present, then the
dschulze@615 1501 first sets ‘<a href="#mask-origin"><code
dschulze@615 1502 class=property>mask-origin</code></a>’ and the second ‘<a
dschulze@615 1503 href="#mask-clip"><code class=property>mask-clip</code></a>’.
dschulze@278 1504
dschulze@445 1505 <p class=note> Note that the properties ‘<a href="#mask-image"><code
dschulze@445 1506 class=property>mask-image</code></a>’, ‘<a href="#mask-repeat"><code
dschulze@445 1507 class=property>mask-repeat</code></a>’, ‘<a
dschulze@445 1508 href="#mask-position"><code class=property>mask-position</code></a>’,
dschulze@445 1509 ‘<a href="#mask-clip"><code class=property>mask-clip</code></a>’,
dschulze@445 1510 ‘<a href="#mask-origin"><code class=property>mask-origin</code></a>’
dschulze@445 1511 and ‘<a href="#mask-size"><code class=property>mask-size</code></a>’
dschulze@551 1512 have no affect on <a class=element-name href="#MaskElement">‘<code
dschulze@551 1513 class=property>mask</code>’</a> elements.
dschulze@551 1514
dschulze@551 1515 <h3 id=the-mask-type><span class=secno>6.9. </span>The ‘<a
dschulze@432 1516 href="#mask-type"><code class=property>mask-type</code></a>’ property</h3>
dschulze@432 1517
dschulze@432 1518 <table class=propdef>
dschulze@432 1519 <tbody>
dschulze@432 1520 <tr>
dschulze@432 1521 <th>Name:
dschulze@432 1522
dschulze@432 1523 <td><dfn id=mask-type>mask-type</dfn>
dschulze@432 1524
dschulze@432 1525 <tr>
dschulze@432 1526 <th><a href="#values">Value</a>:
dschulze@432 1527
dschulze@552 1528 <td>luminance | alpha
dschulze@432 1529
dschulze@432 1530 <tr>
dschulze@432 1531 <th>Initial:
dschulze@432 1532
dschulze@432 1533 <td>luminance
dschulze@432 1534
dschulze@432 1535 <tr>
dschulze@432 1536 <th>Applies to:
dschulze@432 1537
dschulze@551 1538 <td><a class=element-name href="#MaskElement">‘<code
dschulze@551 1539 class=property>mask</code>’</a> elements
dschulze@432 1540
dschulze@432 1541 <tr>
dschulze@432 1542 <th>Inherited:
dschulze@432 1543
dschulze@432 1544 <td>no
dschulze@432 1545
dschulze@432 1546 <tr>
dschulze@432 1547 <th>Percentages:
dschulze@432 1548
dschulze@432 1549 <td>N/A
dschulze@432 1550
dschulze@432 1551 <tr>
dschulze@432 1552 <th>Media:
dschulze@432 1553
dschulze@432 1554 <td>visual
dschulze@432 1555
dschulze@432 1556 <tr>
dschulze@432 1557 <th>Computed value:
dschulze@432 1558
dschulze@432 1559 <td>as specified
dschulze@432 1560
dschulze@432 1561 <tr>
dschulze@432 1562 <th>Animatable:
dschulze@432 1563
dschulze@731 1564 <td>no
dschulze@432 1565 </table>
dschulze@432 1566
birtles@435 1567 <p>The ‘<a href="#mask-type"><code class=property>mask-type</code></a>’
dschulze@551 1568 property defines whether the content of the <a class=element-name
dschulze@551 1569 href="#MaskElement">‘<code class=property>mask</code>’</a> is treated
dschulze@551 1570 as as luminance mask or alpha mask, as described in <a
dschulze@551 1571 href="#MaskValues">Calculating mask values</a>.
dschulze@432 1572
dschulze@432 1573 <p>Values have the following meanings:
dschulze@432 1574
dschulze@432 1575 <dl>
birtles@447 1576 <dt>‘<a href="#luminance"><code class=css>luminance</code></a>’
dschulze@432 1577
dschulze@432 1578 <dd>Indicates that the luminance values of the mask should be used.
dschulze@432 1579
birtles@447 1580 <dt>‘<a href="#alpha"><code class=css>alpha</code></a>’
dschulze@432 1581
dschulze@432 1582 <dd>Indicates that the alpha values of the mask should be used.
dschulze@432 1583 </dl>
dschulze@432 1584
dschulze@445 1585 <p>The ‘<a href="#mask-type"><code class=property>mask-type</code></a>’
dschulze@445 1586 property is a presentation attribute for SVG elements.
dschulze@445 1587
dschulze@551 1588 <h3 id=MaskElement><span class=secno>6.10. </span>The <a class=element-name
dschulze@551 1589 href="#mask">‘<code class=property>mask</code>’</a> element</h3>
dschulze@551 1590
dschulze@551 1591 <table class=propdef summary="mask element">
dschulze@551 1592 <tbody>
dschulze@551 1593 <tr>
dschulze@551 1594 <th>Name:
dschulze@551 1595
dschulze@551 1596 <td><dfn id=mask>mask</dfn>
dschulze@551 1597
dschulze@551 1598 <tr>
dschulze@551 1599 <th>Categories:
dschulze@551 1600
dschulze@551 1601 <td><a
dschulze@551 1602 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermContainerElement">Container
dschulze@551 1603 element</a>
dschulze@551 1604
dschulze@551 1605 <tr>
dschulze@551 1606 <th>Content model:
dschulze@551 1607
dschulze@551 1608 <td>Any number of the following elements, in any order:
dschulze@551 1609 <ul class=no-bullets>
dschulze@551 1610 <li><a
dschulze@551 1611 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermAnimationElement">animation</a>
dschulze@551 1612 <span class=expanding> — <a
dschulze@551 1613 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/animate.html#AnimateElement"><span
dschulze@551 1614 class=element-name>‘animate’</span></a>, <a
dschulze@551 1615 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/animate.html#AnimateColorElement"><span
dschulze@551 1616 class=element-name>‘animateColor’</span></a>, <a
dschulze@551 1617 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/animate.html#AnimateMotionElement"><span
dschulze@551 1618 class=element-name>‘animateMotion’</span></a>, <a
dschulze@551 1619 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/animate.html#AnimateTransformElement"><span
dschulze@551 1620 class=element-name>‘animateTransform’</span></a>, <a
dschulze@551 1621 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/animate.html#SetElement"><span
dschulze@551 1622 class=element-name>‘set’</span></a></span>
dschulze@551 1623
dschulze@551 1624 <li><a
dschulze@551 1625 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermDescriptiveElement">descriptive</a>
dschulze@551 1626 <span class=expanding> — <a
dschulze@551 1627 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#DescElement"><span
dschulze@551 1628 class=element-name>‘desc’</span></a>, <a
dschulze@551 1629 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#TitleElement"><span
dschulze@551 1630 class=element-name>‘title’</span></a>, <a
dschulze@551 1631 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/metadata.html#MetadataElement"><span
dschulze@551 1632 class=element-name>‘metadata’</span></a></span>
dschulze@551 1633
dschulze@551 1634 <li><a
dschulze@551 1635 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermShapeElement">shape</a>
dschulze@551 1636 <span class=expanding> — <a
dschulze@551 1637 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#CircleElement"><span
dschulze@551 1638 class=element-name>‘circle’</span></a>, <a
dschulze@551 1639 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#EllipseElement"><span
dschulze@551 1640 class=element-name>‘ellipse’</span></a>, <a
dschulze@551 1641 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#LineElement"><span
dschulze@551 1642 class=element-name>‘line’</span></a>, <a
dschulze@551 1643 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathElement"><span
dschulze@551 1644 class=element-name>‘path’</span></a>, <a
dschulze@551 1645 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#PolygonElement"><span
dschulze@551 1646 class=element-name>‘polygon’</span></a>, <a
dschulze@551 1647 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#PolylineElement"><span
dschulze@551 1648 class=element-name>‘polyline’</span></a>, <a
dschulze@551 1649 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#RectElement"><span
dschulze@551 1650 class=element-name>‘rect’</span></a></span>
dschulze@551 1651
dschulze@551 1652 <li><a
dschulze@551 1653 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermStructuralElement">structural</a>
dschulze@551 1654 <span class=expanding> — <a
dschulze@551 1655 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#DefsElement"><span
dschulze@551 1656 class=element-name>‘defs’</span></a>, <a
dschulze@551 1657 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#GElement"><span
dschulze@551 1658 class=element-name>‘g’</span></a>, <a
dschulze@551 1659 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#SVGElement"><span
dschulze@551 1660 class=element-name>‘svg’</span></a>, <a
dschulze@551 1661 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#SymbolElement"><span
dschulze@551 1662 class=element-name>‘symbol’</span></a>, <a
dschulze@551 1663 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#UseElement"><span
dschulze@551 1664 class=element-name>‘use’</span></a></span>
dschulze@551 1665
dschulze@551 1666 <li><a
dschulze@551 1667 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGradientElement">gradient</a>
dschulze@551 1668 <span class=expanding> — <a
dschulze@551 1669 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/pservers.html#LinearGradientElement"><span
dschulze@551 1670 class=element-name>‘linearGradient’</span></a>, <a
dschulze@551 1671 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/pservers.html#RadialGradientElement"><span
dschulze@551 1672 class=element-name>‘radialGradient’</span></a></span>
dschulze@551 1673
dschulze@551 1674 <li><a
dschulze@551 1675 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/linking.html#AElement"><span
dschulze@551 1676 class=element-name>‘a’</span></a>
dschulze@551 1677
dschulze@551 1678 <li><a href="#ClipPathElement"><span
dschulze@551 1679 class=element-name>‘clipPath’</span></a>
dschulze@551 1680
dschulze@551 1681 <li><a
dschulze@551 1682 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/color.html#ColorProfileElement"><span
dschulze@551 1683 class=element-name>‘color-profile’</span></a>
dschulze@551 1684
dschulze@551 1685 <li><a
dschulze@551 1686 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/interact.html#CursorElement"><span
dschulze@551 1687 class=element-name>‘cursor’</span></a>
dschulze@551 1688
dschulze@551 1689 <li><a
dschulze@551 1690 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#FilterElement"><span
dschulze@551 1691 class=element-name>‘filter’</span></a>
dschulze@551 1692
dschulze@551 1693 <li><a
dschulze@551 1694 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/fonts.html#FontElement"><span
dschulze@551 1695 class=element-name>‘font’</span></a>
dschulze@551 1696
dschulze@551 1697 <li><a
dschulze@551 1698 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/fonts.html#FontFaceElement"><span
dschulze@551 1699 class=element-name>‘font-face’</span></a>
dschulze@551 1700
dschulze@551 1701 <li><a
dschulze@551 1702 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/extend.html#ForeignObjectElement"><span
dschulze@551 1703 class=element-name>‘foreignObject’</span></a>
dschulze@551 1704
dschulze@551 1705 <li><a
dschulze@551 1706 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#ImageElement"><span
dschulze@551 1707 class=element-name>‘image’</span></a>
dschulze@551 1708
dschulze@551 1709 <li><a
dschulze@551 1710 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#MarkerElement"><span
dschulze@551 1711 class=element-name>‘marker’</span></a>
dschulze@551 1712
dschulze@551 1713 <li><a href="#MaskElement"><span
dschulze@551 1714 class=element-name>‘mask’</span></a>
dschulze@551 1715
dschulze@551 1716 <li><a
dschulze@551 1717 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/pservers.html#PatternElement"><span
dschulze@551 1718 class=element-name>‘pattern’</span></a>
dschulze@551 1719
dschulze@551 1720 <li><a
dschulze@551 1721 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/script.html#ScriptElement"><span
dschulze@551 1722 class=element-name>‘script’</span></a>
dschulze@551 1723
dschulze@551 1724 <li><a
dschulze@551 1725 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/styling.html#StyleElement"><span
dschulze@551 1726 class=element-name>‘style’</span></a>
dschulze@551 1727
dschulze@551 1728 <li><a
dschulze@551 1729 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#SwitchElement"><span
dschulze@551 1730 class=element-name>‘switch’</span></a>
dschulze@551 1731
dschulze@551 1732 <li><a
dschulze@551 1733 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/linking.html#ViewElement"><span
dschulze@551 1734 class=element-name>‘view’</span></a>
dschulze@551 1735
dschulze@551 1736 <li><a
dschulze@551 1737 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#TextElement"><span
dschulze@551 1738 class=element-name>‘text’</span></a>
dschulze@551 1739
dschulze@551 1740 <li><a
dschulze@551 1741 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#AltGlyphDefElement"><span
dschulze@551 1742 class=element-name>‘altGlyphDef’</span></a>
dschulze@551 1743 </ul>
dschulze@551 1744
dschulze@551 1745 <tr>
dschulze@551 1746 <th>Attributes:
dschulze@551 1747
dschulze@551 1748 <td>
dschulze@551 1749 <ul class=no-bullets>
dschulze@551 1750 <li><a
dschulze@551 1751 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermConditionalProcessingAttribute">conditional
dschulze@551 1752 processing attributes</a><span class=expanding> — <a
dschulze@551 1753 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#RequiredFeaturesAttribute"><span
dschulze@551 1754 class=attr-name>‘requiredFeatures’</span></a>, <a
dschulze@551 1755 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#RequiredExtensionsAttribute"><span
dschulze@551 1756 class=attr-name>‘requiredExtensions’</span></a>, <a
dschulze@551 1757 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#SystemLanguageAttribute"><span
dschulze@551 1758 class=attr-name>‘systemLanguage’</span></a></span>
dschulze@551 1759
dschulze@551 1760 <li><a
dschulze@551 1761 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermCoreAttributes">core
dschulze@551 1762 attributes</a><span class=expanding> — <a
dschulze@551 1763 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#IDAttribute"><span
dschulze@551 1764 class=attr-name>‘id’</span></a>, <a
dschulze@551 1765 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#XMLBaseAttribute"><span
dschulze@551 1766 class=attr-name>‘xml:base’</span></a>, <a
dschulze@551 1767 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#XMLLangAttribute"><span
dschulze@551 1768 class=attr-name>‘xml:lang’</span></a>, <a
dschulze@551 1769 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#XMLSpaceAttribute"><span
dschulze@551 1770 class=attr-name>‘xml:space’</span></a></span>
dschulze@551 1771
dschulze@551 1772 <li><a
dschulze@551 1773 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermPresentationAttribute">presentation
dschulze@551 1774 attributes</a><span class=expanding> — <a
dschulze@551 1775 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#AlignmentBaselineProperty"><span
dschulze@551 1776 class=attr-name>‘alignment-baseline’</span></a>, <a
dschulze@551 1777 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#BaselineShiftProperty"><span
dschulze@551 1778 class=attr-name>‘baseline-shift’</span></a>, <a
dschulze@551 1779 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/masking.html#ClipProperty"><span
dschulze@551 1780 class=attr-name>‘clip’</span></a>, <a
dschulze@551 1781 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/masking.html#ClipPathProperty"><span
dschulze@551 1782 class=attr-name>‘clip-path’</span></a>, <a
dschulze@551 1783 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/masking.html#ClipRuleProperty"><span
dschulze@551 1784 class=attr-name>‘clip-rule’</span></a>, <a
dschulze@551 1785 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/color.html#ColorProperty"><span
dschulze@551 1786 class=attr-name>‘color’</span></a>, <a
dschulze@551 1787 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#ColorInterpolationProperty"><span
dschulze@551 1788 class=attr-name>‘color-interpolation’</span></a>, <a
dschulze@551 1789 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#ColorInterpolationFiltersProperty"><span
dschulze@551 1790 class=attr-name>‘color-interpolation-filters’</span></a>, <a
dschulze@551 1791 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/color.html#ColorProfileProperty"><span
dschulze@551 1792 class=attr-name>‘color-profile’</span></a>, <a
dschulze@551 1793 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#ColorRenderingProperty"><span
dschulze@551 1794 class=attr-name>‘color-rendering’</span></a>, <a
dschulze@551 1795 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/interact.html#CursorProperty"><span
dschulze@551 1796 class=attr-name>‘cursor’</span></a>, <a
dschulze@551 1797 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#DirectionProperty"><span
dschulze@551 1798 class=attr-name>‘direction’</span></a>, <a
dschulze@551 1799 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#DisplayProperty"><span
dschulze@551 1800 class=attr-name>‘display’</span></a>, <a
dschulze@551 1801 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#DominantBaselineProperty"><span
dschulze@551 1802 class=attr-name>‘dominant-baseline’</span></a>, <a
dschulze@551 1803 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#EnableBackgroundProperty"><span
dschulze@551 1804 class=attr-name>‘enable-background’</span></a>, <a
dschulze@551 1805 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#FillProperty"><span
dschulze@551 1806 class=attr-name>‘fill’</span></a>, <a
dschulze@551 1807 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#FillOpacityProperty"><span
dschulze@551 1808 class=attr-name>‘fill-opacity’</span></a>, <a
dschulze@551 1809 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#FillRuleProperty"><span
dschulze@551 1810 class=attr-name>‘fill-rule’</span></a>, <a
dschulze@551 1811 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#FilterProperty"><span
dschulze@551 1812 class=attr-name>‘filter’</span></a>, <a
dschulze@551 1813 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#FloodColorProperty"><span
dschulze@551 1814 class=attr-name>‘flood-color’</span></a>, <a
dschulze@551 1815 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#FloodOpacityProperty"><span
dschulze@551 1816 class=attr-name>‘flood-opacity’</span></a>, <a
dschulze@551 1817 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#FontProperty"><span
dschulze@551 1818 class=attr-name>‘font’</span></a>, <a
dschulze@551 1819 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#FontFamilyProperty"><span
dschulze@551 1820 class=attr-name>‘font-family’</span></a>, <a
dschulze@551 1821 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#FontSizeProperty"><span
dschulze@551 1822 class=attr-name>‘font-size’</span></a>, <a
dschulze@551 1823 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#FontSizeAdjustProperty"><span
dschulze@551 1824 class=attr-name>‘font-size-adjust’</span></a>, <a
dschulze@551 1825 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#FontStretchProperty"><span
dschulze@551 1826 class=attr-name>‘font-stretch’</span></a>, <a
dschulze@551 1827 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#FontStyleProperty"><span
dschulze@551 1828 class=attr-name>‘font-style’</span></a>, <a
dschulze@551 1829 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#FontVariantProperty"><span
dschulze@551 1830 class=attr-name>‘font-variant’</span></a>, <a
dschulze@551 1831 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#FontWeightProperty"><span
dschulze@551 1832 class=attr-name>‘font-weight’</span></a>, <a
dschulze@551 1833 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#GlyphOrientationHorizontalProperty"><span
dschulze@551 1834 class=attr-name>‘glyph-orientation-horizontal’</span></a>, <a
dschulze@551 1835 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#GlyphOrientationVerticalProperty"><span
dschulze@551 1836 class=attr-name>‘glyph-orientation-vertical’</span></a>, <a
dschulze@551 1837 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#ImageRenderingProperty"><span
dschulze@551 1838 class=attr-name>‘image-rendering’</span></a>, <a
dschulze@551 1839 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#KerningProperty"><span
dschulze@551 1840 class=attr-name>‘kerning’</span></a>, <a
dschulze@551 1841 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#LetterSpacingProperty"><span
dschulze@551 1842 class=attr-name>‘letter-spacing’</span></a>, <a
dschulze@551 1843 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#LightingColorProperty"><span
dschulze@551 1844 class=attr-name>‘lighting-color’</span></a>, <a
dschulze@551 1845 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#MarkerProperty"><span
dschulze@551 1846 class=attr-name>‘marker’</span></a>, <a
dschulze@551 1847 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#MarkerEndProperty"><span
dschulze@551 1848 class=attr-name>‘marker-end’</span></a>, <a
dschulze@551 1849 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#MarkerMidProperty"><span
dschulze@551 1850 class=attr-name>‘marker-mid’</span></a>, <a
dschulze@551 1851 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#MarkerStartProperty"><span
dschulze@551 1852 class=attr-name>‘marker-start’</span></a>, <a
dschulze@551 1853 href="#MaskProperty"><span class=attr-name>‘mask’</span></a>, <a
dschulze@551 1854 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/masking.html#OpacityProperty"><span
dschulze@551 1855 class=attr-name>‘opacity’</span></a>, <a
dschulze@551 1856 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/masking.html#OverflowProperty"><span
dschulze@551 1857 class=attr-name>‘overflow’</span></a>, <a
dschulze@551 1858 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/interact.html#PointerEventsProperty"><span
dschulze@551 1859 class=attr-name>‘pointer-events’</span></a>, <a
dschulze@551 1860 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#ShapeRenderingProperty"><span
dschulze@551 1861 class=attr-name>‘shape-rendering’</span></a>, <a
dschulze@551 1862 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/pservers.html#StopColorProperty"><span
dschulze@551 1863 class=attr-name>‘stop-color’</span></a>, <a
dschulze@551 1864 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/pservers.html#StopOpacityProperty"><span
dschulze@551 1865 class=attr-name>‘stop-opacity’</span></a>, <a
dschulze@551 1866 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#StrokeProperty"><span
dschulze@551 1867 class=attr-name>‘stroke’</span></a>, <a
dschulze@551 1868 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#StrokeDasharrayProperty"><span
dschulze@551 1869 class=attr-name>‘stroke-dasharray’</span></a>, <a
dschulze@551 1870 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#StrokeDashoffsetProperty"><span
dschulze@551 1871 class=attr-name>‘stroke-dashoffset’</span></a>, <a
dschulze@551 1872 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#StrokeLinecapProperty"><span
dschulze@551 1873 class=attr-name>‘stroke-linecap’</span></a>, <a
dschulze@551 1874 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#StrokeLinejoinProperty"><span
dschulze@551 1875 class=attr-name>‘stroke-linejoin’</span></a>, <a
dschulze@551 1876 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#StrokeMiterlimitProperty"><span
dschulze@551 1877 class=attr-name>‘stroke-miterlimit’</span></a>, <a
dschulze@551 1878 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#StrokeOpacityProperty"><span
dschulze@551 1879 class=attr-name>‘stroke-opacity’</span></a>, <a
dschulze@551 1880 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#StrokeWidthProperty"><span
dschulze@551 1881 class=attr-name>‘stroke-width’</span></a>, <a
dschulze@551 1882 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#TextAnchorProperty"><span
dschulze@551 1883 class=attr-name>‘text-anchor’</span></a>, <a
dschulze@551 1884 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#TextDecorationProperty"><span
dschulze@551 1885 class=attr-name>‘text-decoration’</span></a>, <a
dschulze@551 1886 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#TextRenderingProperty"><span
dschulze@551 1887 class=attr-name>‘text-rendering’</span></a>, <a
dschulze@551 1888 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#UnicodeBidiProperty"><span
dschulze@551 1889 class=attr-name>‘unicode-bidi’</span></a>, <a
dschulze@551 1890 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#VisibilityProperty"><span
dschulze@551 1891 class=attr-name>‘visibility’</span></a>, <a
dschulze@551 1892 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#WordSpacingProperty"><span
dschulze@551 1893 class=attr-name>‘word-spacing’</span></a>, <a
dschulze@551 1894 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#WritingModeProperty"><span
dschulze@551 1895 class=attr-name>‘writing-mode’</span></a></span>
dschulze@551 1896
dschulze@551 1897 <li><a
dschulze@551 1898 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/styling.html#ClassAttribute"><span
dschulze@551 1899 class=attr-name>‘class’</span></a>
dschulze@551 1900
dschulze@551 1901 <li><a
dschulze@551 1902 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/styling.html#StyleAttribute"><span
dschulze@551 1903 class=attr-name>‘style’</span></a>
dschulze@551 1904
dschulze@551 1905 <li><a href="#MaskElementXAttribute"><span
dschulze@551 1906 class=attr-name>‘x’</span></a>
dschulze@551 1907
dschulze@551 1908 <li><a href="#MaskElementYAttribute"><span
dschulze@551 1909 class=attr-name>‘y’</span></a>
dschulze@551 1910
dschulze@551 1911 <li><a href="#MaskElementWidthAttribute"><span
dschulze@551 1912 class=attr-name>‘width’</span></a>
dschulze@551 1913
dschulze@551 1914 <li><a href="#MaskElementHeightAttribute"><span
dschulze@551 1915 class=attr-name>‘height’</span></a>
dschulze@551 1916
dschulze@551 1917 <li><a href="#MaskElementMaskUnitsAttribute"><span
dschulze@551 1918 class=attr-name>‘maskUnits’</span></a>
dschulze@551 1919
dschulze@551 1920 <li><a href="#MaskElementMaskContentUnitsAttribute"><span
dschulze@551 1921 class=attr-name>‘maskContentUnits’</span></a>
dschulze@551 1922 </ul>
dschulze@551 1923
dschulze@551 1924 <tr>
dschulze@551 1925 <th>DOM Interfaces:
dschulze@551 1926
dschulze@551 1927 <td><a class=idlinterface
dschulze@551 1928 href="#InterfaceSVGMaskElement">SVGMaskElement</a>
dschulze@551 1929 </table>
dschulze@298 1930
dschulze@273 1931 <div class=adef-list>
dschulze@427 1932 <p><em>Attribute definitions:</em>
dschulze@273 1933
dschulze@273 1934 <dl>
dschulze@273 1935 <dt id=MaskElementMaskUnitsAttribute><span class=adef>maskUnits</span> =
dschulze@273 1936 "<em>userSpaceOnUse</em> | <em>objectBoundingBox</em>"
dschulze@273 1937
dschulze@551 1938 <dd>Defines the coordinate system for attributes <a class=attr-name
dschulze@551 1939 href="#MaskElementXAttribute">‘<code class=property>x</code>’</a>,
dschulze@551 1940 <a class=attr-name href="#MaskElementYAttribute">‘<code
dschulze@551 1941 class=property>y</code>’</a>, <a class=attr-name
dschulze@551 1942 href="#MaskElementWidthAttribute">‘<code
dschulze@551 1943 class=property>width</code>’</a> and <a class=attr-name
dschulze@551 1944 href="#MaskElementHeightAttribute">‘<code
dschulze@551 1945 class=property>height</code>’</a>.<br>
dschulze@551 1946 If <span class=attr-value>maskUnits="userSpaceOnUse"</span>, <a
dschulze@551 1947 class=attr-name href="#MaskElementXAttribute">‘<code
dschulze@551 1948 class=property>x</code>’</a>, <a class=attr-name
dschulze@551 1949 href="#MaskElementYAttribute">‘<code class=property>y</code>’</a>,
dschulze@551 1950 <a class=attr-name href="#MaskElementWidthAttribute">‘<code
dschulze@551 1951 class=property>width</code>’</a> and <a class=attr-name
dschulze@551 1952 href="#MaskElementHeightAttribute">‘<code
dschulze@551 1953 class=property>height</code>’</a> represent values in the current user
dschulze@551 1954 coordinate system in place at the time when the <a class=element-name
dschulze@551 1955 href="#MaskElement">‘<code class=property>mask</code>’</a> element
dschulze@551 1956 is referenced (i.e., the user coordinate system for the element
dschulze@551 1957 referencing the <a class=element-name href="#MaskElement">‘<code
dschulze@551 1958 class=property>mask</code>’</a> element via the ‘<a
dschulze@551 1959 href="#mask"><code class=property>mask</code></a>’ property).<br>
dschulze@551 1960 If <span class=attr-value>maskUnits="objectBoundingBox"</span>, <a
dschulze@551 1961 class=attr-name href="#MaskElementXAttribute">‘<code
dschulze@551 1962 class=property>x</code>’</a>, <a class=attr-name
dschulze@551 1963 href="#MaskElementYAttribute">‘<code class=property>y</code>’</a>,
dschulze@551 1964 <a class=attr-name href="#MaskElementWidthAttribute">‘<code
dschulze@551 1965 class=property>width</code>’</a> and <a class=attr-name
dschulze@551 1966 href="#MaskElementHeightAttribute">‘<code
dschulze@551 1967 class=property>height</code>’</a> represent fractions or percentages
dschulze@273 1968 of the bounding box of the element to which the mask is applied. (See <a
dschulze@273 1969 class=term href="#object-bounding-box-units">object bounding box
dschulze@273 1970 units</a>.)<br>
dschulze@551 1971 If attribute <a class=attr-name
dschulze@551 1972 href="#MaskElementMaskUnitsAttribute">‘<code
dschulze@551 1973 class=property>maskUnits</code>’</a> is not specified, then the effect
dschulze@551 1974 is as if a value of <span class=attr-value>‘<code
dschulze@273 1975 class=property>objectBoundingBox</code>’</span> were specified.<br>
dschulze@343 1976 <span class=anim-target>Animatable: yes.</span>
dschulze@273 1977
dschulze@273 1978 <dt id=MaskElementMaskContentUnitsAttribute><span
dschulze@273 1979 class=adef>maskContentUnits</span> = "<em>userSpaceOnUse</em> |
dschulze@273 1980 <em>objectBoundingBox</em>"
dschulze@273 1981
dschulze@551 1982 <dd>Defines the coordinate system for the contents of the <a
dschulze@551 1983 class=element-name href="#MaskElement">‘<code
dschulze@551 1984 class=property>mask</code>’</a>.<br>
dschulze@273 1985 If <span class=attr-value>maskContentUnits="userSpaceOnUse"</span>, the
dschulze@551 1986 user coordinate system for the contents of the <a class=element-name
dschulze@551 1987 href="#MaskElement">‘<code class=property>mask</code>’</a> element
dschulze@551 1988 is the current user coordinate system in place at the time when the <a
dschulze@551 1989 class=element-name href="#MaskElement">‘<code
dschulze@551 1990 class=property>mask</code>’</a> element is referenced (i.e., the user
dschulze@551 1991 coordinate system for the element referencing the <a class=element-name
dschulze@551 1992 href="#MaskElement">‘<code class=property>mask</code>’</a> element
dschulze@551 1993 via the ‘<a href="#mask"><code class=property>mask</code></a>’
dschulze@273 1994 property).<br>
dschulze@273 1995 If <span class=attr-value>maskContentUnits="objectBoundingBox"</span>,
dschulze@551 1996 the user coordinate system for the contents of the <a class=element-name
dschulze@551 1997 href="#MaskElement">‘<code class=property>mask</code>’</a> is
dschulze@551 1998 established using the bounding box of the element to which the mask is
dschulze@551 1999 applied. (See <a class=term href="#object-bounding-box-units">object
dschulze@551 2000 bounding box units</a>.)<br>
dschulze@551 2001 If attribute <a class=attr-name
dschulze@551 2002 href="#MaskElementMaskContentUnitsAttribute">‘<code
dschulze@551 2003 class=property>maskContentUnits</code>’</a> is not specified, then the
dschulze@551 2004 effect is as if a value of <span class=attr-value>‘<code
dschulze@551 2005 class=property>userSpaceOnUse</code>’</span> were specified.<br>
dschulze@343 2006 <span class=anim-target>Animatable: yes.</span>
dschulze@273 2007
dschulze@343 2008 <dt id=MaskElementXAttribute><span class=adef>x</span> =
dschulze@343 2009 "<var>&lt;length&gt;</var> | <var>&lt;percentage&gt;</var>"
dschulze@273 2010
dschulze@273 2011 <dd>The x-axis coordinate of one corner of the rectangle for the largest
dschulze@726 2012 possible offscreen buffer. If the attribute is not specified but at
dschulze@726 2013 least one of the attributes <a class=attr-name
dschulze@726 2014 href="#MaskElementYAttribute">‘<code class=property>y</code>’</a>,
dschulze@726 2015 <a class=attr-name href="#MaskElementWidthAttribute">‘<code
dschulze@726 2016 class=property>width</code>’</a> or <a class=attr-name
dschulze@726 2017 href="#MaskElementHeightAttribute">‘<code
dschulze@726 2018 class=property>height</code>’</a> are specified, the effect is as if a
dschulze@726 2019 value of <span class=attr-value>‘<code class=css>-10%</code>’</span>
dschulze@726 2020 were specified.<br>
dschulze@343 2021 <span class=anim-target>Animatable: yes.</span>
dschulze@343 2022
dschulze@343 2023 <dt id=MaskElementYAttribute><span class=adef>y</span> =
dschulze@343 2024 "<var>&lt;length&gt;</var> | <var>&lt;percentage&gt;</var>"
dschulze@273 2025
dschulze@273 2026 <dd>The y-axis coordinate of one corner of the rectangle for the largest
dschulze@273 2027 possible offscreen buffer.<br>
dschulze@726 2028 If the attribute is not specified but at least one of the attributes <a
dschulze@726 2029 class=attr-name href="#MaskElementXAttribute">‘<code
dschulze@726 2030 class=property>x</code>’</a>, <a class=attr-name
dschulze@726 2031 href="#MaskElementWidthAttribute">‘<code
dschulze@726 2032 class=property>width</code>’</a> or <a class=attr-name
dschulze@726 2033 href="#MaskElementHeightAttribute">‘<code
dschulze@726 2034 class=property>height</code>’</a> are specified, the effect is as if a
dschulze@726 2035 value of <span class=attr-value>‘<code class=css>-10%</code>’</span>
dschulze@726 2036 were specified.<br>
dschulze@343 2037 <span class=anim-target>Animatable: yes.</span>
dschulze@343 2038
dschulze@343 2039 <dt id=MaskElementWidthAttribute><span class=adef>width</span> =
dschulze@343 2040 "<var>&lt;length&gt;</var> | <var>&lt;percentage&gt;</var>"
dschulze@273 2041
dschulze@726 2042 <dd>The width of the largest possible offscreen buffer. A negative value
dschulze@726 2043 or a value of zero disables rendering of the element.<br>
dschulze@726 2044 If the attribute is not specified but at least one of the attributes <a
dschulze@726 2045 class=attr-name href="#MaskElementXAttribute">‘<code
dschulze@726 2046 class=property>x</code>’</a>, <a class=attr-name
dschulze@726 2047 href="#MaskElementYAttribute">‘<code class=property>y</code>’</a> or
dschulze@726 2048 <a class=attr-name href="#MaskElementHeightAttribute">‘<code
dschulze@726 2049 class=property>height</code>’</a> are specified, the effect is as if a
dschulze@726 2050 value of <span class=attr-value>‘<code class=css>120%</code>’</span>
dschulze@726 2051 were specified.<br>
dschulze@726 2052 <span class=anim-target>Animatable: yes.</span>
dschulze@343 2053
dschulze@343 2054 <dt id=MaskElementHeightAttribute><span class=adef>height</span> =
dschulze@343 2055 "<var>&lt;length&gt;</var> | <var>&lt;percentage&gt;</var>"
dschulze@273 2056
dschulze@273 2057 <dd>The height of the largest possible offscreen buffer.<br>
dschulze@279 2058 A negative value or a value of zero disables rendering of the
dschulze@279 2059 element.<br>
dschulze@726 2060 If the attribute is not specified but at least one of the attributes <a
dschulze@726 2061 class=attr-name href="#MaskElementXAttribute">‘<code
dschulze@726 2062 class=property>x</code>’</a>, <a class=attr-name
dschulze@726 2063 href="#MaskElementYAttribute">‘<code class=property>y</code>’</a> or
dschulze@726 2064 <a class=attr-name href="#MaskElementWidthAttribute">‘<code
dschulze@726 2065 class=property>width</code>’</a> are specified, the effect is as if a
dschulze@726 2066 value of <span class=attr-value>‘<code class=css>120%</code>’</span>
dschulze@726 2067 were specified.<br>
dschulze@343 2068 <span class=anim-target>Animatable: yes.</span>
dschulze@273 2069 </dl>
dschulze@273 2070 </div>
dschulze@273 2071
dschulze@734 2072 <p>If at least one of the attributes <a class=attr-name
dschulze@734 2073 href="#MaskElementXAttribute">‘<code class=property>x</code>’</a>, <a
dschulze@734 2074 class=attr-name href="#MaskElementYAttribute">‘<code
dschulze@734 2075 class=property>y</code>’</a>, <a class=attr-name
dschulze@734 2076 href="#MaskElementWidthAttribute">‘<code
dschulze@726 2077 class=property>width</code>’</a> or <a class=attr-name
dschulze@726 2078 href="#MaskElementHeightAttribute">‘<code
dschulze@726 2079 class=property>height</code>’</a> are specified, the given object and
dschulze@726 2080 the rectangle defined by <a class=attr-name
dschulze@726 2081 href="#MaskElementXAttribute">‘<code class=property>x</code>’</a>, <a
dschulze@726 2082 class=attr-name href="#MaskElementYAttribute">‘<code
dschulze@726 2083 class=property>y</code>’</a>, <a class=attr-name
dschulze@726 2084 href="#MaskElementWidthAttribute">‘<code
dschulze@726 2085 class=property>width</code>’</a> and <a class=attr-name
dschulze@726 2086 href="#MaskElementHeightAttribute">‘<code
dschulze@727 2087 class=property>height</code>’</a> establish a current clipping path. The
dschulze@727 2088 rendered content of the mask must be clipped by this current clipping
dschulze@726 2089 path.
dschulze@726 2090
dschulze@726 2091 <p>
dschulze@726 2092
dschulze@551 2093 <p>CSS properties inherit into the <a class=element-name
dschulze@551 2094 href="#MaskElement">‘<code class=property>mask</code>’</a> element
dschulze@551 2095 from its ancestors; properties do <em>not</em> inherit from the element
dschulze@551 2096 referencing the <a class=element-name href="#MaskElement">‘<code
dschulze@551 2097 class=property>mask</code>’</a> element.
dschulze@551 2098
dschulze@551 2099 <p><a class=element-name href="#MaskElement">‘<code
dschulze@551 2100 class=property>mask</code>’</a> elements are never rendered directly;
dschulze@551 2101 their only usage is as something that can be referenced using the ‘<a
dschulze@551 2102 href="#mask"><code class=property>mask</code></a>’ property. The
dschulze@551 2103 ‘<code class=property>opacity</code>’, ‘<code
dschulze@551 2104 class=property>filter</code>’ and ‘<code
dschulze@551 2105 class=property>display</code>’ properties do not apply to the <a
dschulze@551 2106 class=element-name href="#MaskElement">‘<code
dschulze@551 2107 class=property>mask</code>’</a> element; thus, <a class=element-name
dschulze@551 2108 href="#MaskElement">‘<code class=property>mask</code>’</a> elements
dschulze@551 2109 are not directly rendered even if the ‘<code
dschulze@551 2110 class=property>display</code>’ property is set to a value other than
dschulze@551 2111 ‘<a href="#none"><code class=property>none</code></a>’, and <a
dschulze@551 2112 class=element-name href="#MaskElement">‘<code
dschulze@551 2113 class=property>mask</code>’</a> elements are available for referencing
dschulze@551 2114 even when the ‘<code class=property>display</code>’ property on the <a
dschulze@551 2115 class=element-name href="#MaskElement">‘<code
dschulze@551 2116 class=property>mask</code>’</a> element or any of its ancestors is set
dschulze@551 2117 to <a class=prop-value href="#none">none</a>.
dschulze@278 2118
dschulze@292 2119 <h2 id=mask-box-image><span class=secno>7. </span>Mask Box Image</h2>
dschulze@292 2120
dschulze@342 2121 <p> With ‘<a href="#mask-box-image0"><code
birtles@466 2122 class=property>mask-box-image</code></a>’ a mask can be split into nine
birtles@466 2123 pieces: four corners, four edges and the middle piece as demonstrated in
birtles@466 2124 the figure below.
dschulze@342 2125
dschulze@342 2126 <div class=figure> <img alt="pieces of a mask box image"
dschulze@342 2127 src="images/mask-box-image-mask.svg" width=240>
dschulze@427 2128 <p class=caption> Pieces of a mask box image.
dschulze@342 2129 </div>
dschulze@342 2130
dschulze@342 2131 <p> These pieces may be sliced, scaled and stretched in various ways to fit
dschulze@342 2132 the size of the <span class=index id=mask-image-area>mask image
dschulze@659 2133 area</span>. The usage of ‘<a href="#mask-box-image0"><code
dschulze@659 2134 class=property>mask-box-image</code></a>’ corresponds to the ‘<code
dschulze@659 2135 class=property>border-image</code>’ property of CSS Background and
dschulze@659 2136 Borders <a href="#CSS3BG" rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a>.
dschulze@299 2137
dschulze@313 2138 <div class=example>
birtles@436 2139 <p> The mask image in the following example is split into four corners
birtles@436 2140 with dimensions of 75 pixels, four edges and the middle piece that is
birtles@436 2141 stretched and scaled.
dschulze@342 2142
dschulze@313 2143 <div class=figure> <img alt="Example for 'mask-box-image'" height=240
dschulze@313 2144 src="images/mask-box-image.svg" width=720>
dschulze@342 2145 <p class=caption> Example for ‘<a href="#mask-box-image0"><code
dschulze@313 2146 class=property>mask-box-image</code></a>’. The object on the left is
dschulze@313 2147 the object to mask. The second image is the alpha mask and the last
dschulze@427 2148 image the masked object.
dschulze@313 2149 </div>
dschulze@313 2150
dschulze@470 2151 <pre>
dschulze@470 2152 div {
dschulze@470 2153 background: linear-gradient(bottom, #F27BAA 0%, #FCC8AD 100%);
dschulze@470 2154 mask-box-image-slice: 25 fill;
dschulze@470 2155 mask-box-image-repeat: stretch;
dschulze@470 2156 mask-box-image-source: url(mask.png);
dschulze@313 2157 }</pre>
dschulze@313 2158 </div>
dschulze@313 2159
dschulze@299 2160 <h3 id=the-mask-box-image-source><span class=secno>7.1. </span>The ‘<a
dschulze@299 2161 href="#mask-box-image-source"><code
dschulze@299 2162 class=property>mask-box-image-source</code></a>’ property</h3>
dschulze@299 2163
dschulze@299 2164 <table class=propdef>
dschulze@299 2165 <tbody>
dschulze@299 2166 <tr>
dschulze@299 2167 <th>Name:
dschulze@299 2168
dschulze@299 2169 <td><dfn id=mask-box-image-source>mask-box-image-source</dfn>
dschulze@299 2170
dschulze@299 2171 <tr>
dschulze@299 2172 <th><a href="#values">Value</a>:
dschulze@299 2173
dschulze@299 2174 <td><a href="#ltmask-imagegt"><var>&lt;mask-image&gt;</var></a>
dschulze@299 2175
dschulze@299 2176 <tr>
dschulze@299 2177 <th>Initial:
dschulze@299 2178
dschulze@299 2179 <td>none
dschulze@299 2180
dschulze@299 2181 <tr>
dschulze@299 2182 <th>Applies to:
dschulze@299 2183
dschulze@551 2184 <td>All elements. In SVG, it applies to <a
dschulze@551 2185 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermContainerElement">container
dschulze@551 2186 elements</a> and <a
dschulze@551 2187 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@551 2188 elements</a>.
dschulze@299 2189
dschulze@299 2190 <tr>
dschulze@299 2191 <th>Inherited:
dschulze@299 2192
dschulze@299 2193 <td>no
dschulze@299 2194
dschulze@299 2195 <tr>
dschulze@299 2196 <th>Percentages:
dschulze@299 2197
dschulze@299 2198 <td>N/A
dschulze@299 2199
dschulze@299 2200 <tr>
dschulze@299 2201 <th>Media:
dschulze@299 2202
dschulze@299 2203 <td>visual
dschulze@299 2204
dschulze@299 2205 <tr>
dschulze@299 2206 <th>Computed value:
dschulze@299 2207
dschulze@299 2208 <td>‘<a href="#none"><code class=css>none</code></a>’ or the image
dschulze@299 2209 with its URI made absolute
dschulze@299 2210
dschulze@299 2211 <tr>
dschulze@299 2212 <th>Animatable:
dschulze@299 2213
dschulze@299 2214 <td>no
dschulze@299 2215 </table>
dschulze@299 2216
dschulze@301 2217 <p>Specifies an image to be used as mask. If the value is ‘<a
dschulze@301 2218 href="#none"><code class=css>none</code></a>’ or if the image cannot be
dschulze@301 2219 displayed (or the property doesn't apply), the content won't get masked.
dschulze@301 2220
dschulze@299 2221 <h3 id=the-mask-box-image-slice><span class=secno>7.2. </span>The ‘<a
dschulze@299 2222 href="#mask-box-image-slice"><code
dschulze@299 2223 class=property>mask-box-image-slice</code></a>’ property</h3>
dschulze@299 2224
dschulze@299 2225 <table class=propdef>
dschulze@299 2226 <tbody>
dschulze@299 2227 <tr>
dschulze@299 2228 <th>Name:
dschulze@299 2229
dschulze@299 2230 <td><dfn id=mask-box-image-slice>mask-box-image-slice</dfn>
dschulze@299 2231
dschulze@299 2232 <tr>
dschulze@299 2233 <th><a href="#values">Value</a>:
dschulze@299 2234
dschulze@299 2235 <td>[<var>&lt;number&gt;</var> | <var>&lt;percentage&gt;</var>]{1,4}
dschulze@299 2236 &amp;&amp; fill?
dschulze@299 2237
dschulze@299 2238 <tr>
dschulze@299 2239 <th>Initial:
dschulze@299 2240
dschulze@301 2241 <td>0 fill
dschulze@299 2242
dschulze@299 2243 <tr>
dschulze@299 2244 <th>Applies to:
dschulze@299 2245
dschulze@551 2246 <td>All elements. In SVG, it applies to <a
dschulze@551 2247 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermContainerElement">container
dschulze@551 2248 elements</a> and <a
dschulze@551 2249 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@551 2250 elements</a>.
dschulze@299 2251
dschulze@299 2252 <tr>
dschulze@299 2253 <th>Inherited:
dschulze@299 2254
dschulze@299 2255 <td>no
dschulze@299 2256
dschulze@299 2257 <tr>
dschulze@299 2258 <th>Percentages:
dschulze@299 2259
dschulze@451 2260 <td>refer to size of the mask image
dschulze@299 2261
dschulze@299 2262 <tr>
dschulze@299 2263 <th>Media:
dschulze@299 2264
dschulze@299 2265 <td>visual
dschulze@299 2266
dschulze@299 2267 <tr>
dschulze@299 2268 <th>Computed value:
dschulze@299 2269
dschulze@299 2270 <td>as specified
dschulze@299 2271
dschulze@299 2272 <tr>
dschulze@299 2273 <th>Animatable:
dschulze@299 2274
dschulze@299 2275 <td>no
dschulze@299 2276 </table>
dschulze@299 2277
dschulze@301 2278 <p>This property specifies inward offsets from the top, right, bottom, and
dschulze@301 2279 left edges of the mask image, dividing it into nine regions: four corners,
dschulze@301 2280 four edges and a middle. The middle image part is discarded (treated as
dschulze@659 2281 fully transparent black) unless the ‘<code class=css>fill</code>’
dschulze@301 2282 keyword is present.
dschulze@301 2283
dschulze@659 2284 <p>See <a
dschulze@659 2285 href="http://www.w3.org/TR/css3-background/#the-border-image-slice">Image
dschulze@659 2286 Slicing: the ‘<code class=property>border-image-slice</code>’
dschulze@659 2287 property</a> <a href="#CSS3BG"
dschulze@746 2288 rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a> for the definitions of the
dschulze@659 2289 property values.
dschulze@301 2290
dschulze@299 2291 <h3 id=the-mask-box-image-width><span class=secno>7.3. </span>The ‘<a
dschulze@299 2292 href="#mask-box-image-width"><code
dschulze@299 2293 class=property>mask-box-image-width</code></a>’ property</h3>
dschulze@299 2294
dschulze@299 2295 <table class=propdef>
dschulze@299 2296 <tbody>
dschulze@299 2297 <tr>
dschulze@299 2298 <th>Name:
dschulze@299 2299
dschulze@299 2300 <td><dfn id=mask-box-image-width>mask-box-image-width</dfn>
dschulze@299 2301
dschulze@299 2302 <tr>
dschulze@299 2303 <th><a href="#values">Value</a>:
dschulze@299 2304
dschulze@299 2305 <td>[ <var>&lt;length&gt;</var> | <var>&lt;percentage&gt;</var> |
dschulze@299 2306 <var>&lt;number&gt;</var> | auto ]{1,4}
dschulze@299 2307
dschulze@299 2308 <tr>
dschulze@299 2309 <th>Initial:
dschulze@299 2310
dschulze@301 2311 <td>auto
dschulze@299 2312
dschulze@299 2313 <tr>
dschulze@299 2314 <th>Applies to:
dschulze@299 2315
dschulze@551 2316 <td>All elements. In SVG, it applies to <a
dschulze@551 2317 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermContainerElement">container
dschulze@551 2318 elements</a> and <a
dschulze@551 2319 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@551 2320 elements</a>.
dschulze@299 2321
dschulze@299 2322 <tr>
dschulze@299 2323 <th>Inherited:
dschulze@299 2324
dschulze@299 2325 <td>no
dschulze@299 2326
dschulze@299 2327 <tr>
dschulze@299 2328 <th>Percentages:
dschulze@299 2329
dschulze@451 2330 <td>relative to width/height of the <a
dschulze@301 2331 href="#mask-box-image-area"><em>mask box image area</em></a>
dschulze@299 2332
dschulze@299 2333 <tr>
dschulze@299 2334 <th>Media:
dschulze@299 2335
dschulze@299 2336 <td>visual
dschulze@299 2337
dschulze@299 2338 <tr>
dschulze@299 2339 <th>Computed value:
dschulze@299 2340
dschulze@299 2341 <td>all <var>&lt;length&gt;</var>s made absolute, otherwise as specified
dschulze@299 2342
dschulze@299 2343 <tr>
dschulze@299 2344 <th>Animatable:
dschulze@299 2345
dschulze@299 2346 <td>no
dschulze@299 2347 </table>
dschulze@299 2348
dschulze@301 2349 <p>The mask image is drawn inside an area called the <a
dschulze@301 2350 href="#mask-box-image-area"><em>mask box image area</em></a>. This is an
dschulze@301 2351 area whose boundaries by default correspond to the mask box, see ‘<a
dschulze@301 2352 href="#mask-box-image-outset"><code
dschulze@301 2353 class=property>mask-box-image-outset</code></a>’.
dschulze@301 2354
dschulze@659 2355 <p>See <a
dschulze@659 2356 href="http://www.w3.org/TR/css3-background/#the-border-image-width">Drawing
dschulze@659 2357 Areas: the ‘border-image-width’ property</a> <a href="#CSS3BG"
dschulze@746 2358 rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a> for the definitions of the
dschulze@659 2359 property values.
dschulze@301 2360
birtles@466 2361 <p class=note> Note that for SVG elements without an associated layout box
birtles@466 2362 the ‘<code class=property>border-width</code>’ is considered to be
dschulze@453 2363 ‘<code class=css>0</code>’.
dschulze@301 2364
dschulze@299 2365 <h3 id=the-mask-box-image-outset><span class=secno>7.4. </span>The ‘<a
dschulze@299 2366 href="#mask-box-image-outset"><code
dschulze@299 2367 class=property>mask-box-image-outset</code></a>’ property</h3>
dschulze@299 2368
dschulze@299 2369 <table class=propdef>
dschulze@299 2370 <tbody>
dschulze@299 2371 <tr>
dschulze@299 2372 <th>Name:
dschulze@299 2373
dschulze@299 2374 <td><dfn id=mask-box-image-outset>mask-box-image-outset</dfn>
dschulze@299 2375
dschulze@299 2376 <tr>
dschulze@299 2377 <th><a href="#values">Value</a>:
dschulze@299 2378
dschulze@299 2379 <td>[ <var>&lt;length&gt;</var> | <var>&lt;number&gt;</var> ]{1,4}
dschulze@299 2380
dschulze@299 2381 <tr>
dschulze@299 2382 <th>Initial:
dschulze@299 2383
dschulze@299 2384 <td>0
dschulze@299 2385
dschulze@299 2386 <tr>
dschulze@299 2387 <th>Applies to:
dschulze@299 2388
dschulze@551 2389 <td>All elements. In SVG, it applies to <a
dschulze@551 2390 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermContainerElement">container
dschulze@551 2391 elements</a> and <a
dschulze@551 2392 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@551 2393 elements</a>.
dschulze@299 2394
dschulze@299 2395 <tr>
dschulze@299 2396 <th>Inherited:
dschulze@299 2397
dschulze@299 2398 <td>no
dschulze@299 2399
dschulze@299 2400 <tr>
dschulze@299 2401 <th>Percentages:
dschulze@299 2402
dschulze@299 2403 <td>N/A
dschulze@299 2404
dschulze@299 2405 <tr>
dschulze@299 2406 <th>Media:
dschulze@299 2407
dschulze@299 2408 <td>visual
dschulze@299 2409
dschulze@299 2410 <tr>
dschulze@299 2411 <th>Computed value:
dschulze@299 2412
dschulze@299 2413 <td>all <var>&lt;length&gt;</var>s made absolute, otherwise as specified
dschulze@299 2414
dschulze@299 2415 <tr>
dschulze@299 2416 <th>Animatable:
dschulze@299 2417
dschulze@299 2418 <td>no
dschulze@299 2419 </table>
dschulze@299 2420
dschulze@301 2421 <p>The values specify the amount by which the <dfn
dschulze@301 2422 id=mask-box-image-area>mask box image area</dfn> extends beyond the border
dschulze@301 2423 box. If it has four values, they set the outsets on the top, right, bottom
dschulze@301 2424 and left sides in that order. If the left is missing, it is the same as
dschulze@301 2425 the right; if the bottom is missing, it is the same as the top; if the
dschulze@301 2426 right is missing, it is the same as the top.
dschulze@301 2427
dschulze@301 2428 <p>As with ‘<a href="#mask-box-image-width"><code
dschulze@301 2429 class=property>mask-box-image-width</code></a>’, a &lt;number&gt;
dschulze@343 2430 represents a multiple of the corresponding ‘<code
dschulze@343 2431 class=property>border-width</code>’. Negative values are not allowed for
dschulze@343 2432 any of the ‘<a href="#mask-box-image-outset"><code
dschulze@301 2433 class=property>mask-box-image-outset</code></a>’ values.
dschulze@301 2434
dschulze@453 2435 <p class=note>Note that for SVG elements without associated layout box the
dschulze@453 2436 ‘<code class=property>border-width</code>’ is considered to be
dschulze@453 2437 ‘<code class=css>0</code>’.
dschulze@301 2438
dschulze@299 2439 <h3 id=the-mask-box-image-repeat><span class=secno>7.5. </span>The ‘<a
dschulze@299 2440 href="#mask-box-image-repeat"><code
dschulze@299 2441 class=property>mask-box-image-repeat</code></a>’ property</h3>
dschulze@299 2442
dschulze@299 2443 <table class=propdef>
dschulze@299 2444 <tbody>
dschulze@299 2445 <tr>
dschulze@299 2446 <th>Name:
dschulze@299 2447
dschulze@299 2448 <td><dfn id=mask-box-image-repeat>mask-box-image-repeat</dfn>
dschulze@299 2449
dschulze@299 2450 <tr>
dschulze@299 2451 <th><a href="#values">Value</a>:
dschulze@299 2452
dschulze@299 2453 <td>[ stretch | repeat | round | space ]{1,2}
dschulze@299 2454
dschulze@299 2455 <tr>
dschulze@299 2456 <th>Initial:
dschulze@299 2457
dschulze@299 2458 <td>stretch
dschulze@299 2459
dschulze@299 2460 <tr>
dschulze@299 2461 <th>Applies to:
dschulze@299 2462
dschulze@551 2463 <td>All elements. In SVG, it applies to <a
dschulze@551 2464 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermContainerElement">container
dschulze@551 2465 elements</a> and <a
dschulze@551 2466 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@551 2467 elements</a>.
dschulze@299 2468
dschulze@299 2469 <tr>
dschulze@299 2470 <th>Inherited:
dschulze@299 2471
dschulze@299 2472 <td>no
dschulze@299 2473
dschulze@299 2474 <tr>
dschulze@299 2475 <th>Percentages:
dschulze@299 2476
dschulze@299 2477 <td>N/A
dschulze@299 2478
dschulze@299 2479 <tr>
dschulze@299 2480 <th>Media:
dschulze@299 2481
dschulze@299 2482 <td>visual
dschulze@299 2483
dschulze@299 2484 <tr>
dschulze@299 2485 <th>Computed value:
dschulze@299 2486
dschulze@299 2487 <td>as specified
dschulze@299 2488
dschulze@299 2489 <tr>
dschulze@299 2490 <th>Animatable:
dschulze@299 2491
dschulze@299 2492 <td>no
dschulze@299 2493 </table>
dschulze@299 2494
dschulze@301 2495 <p>This property specifies how the images for the sides and the middle part
dschulze@301 2496 of the mask image are scaled and tiled. The first keyword applies to the
dschulze@301 2497 horizontal sides, the second to the vertical ones. If the second keyword
dschulze@659 2498 is absent, it is assumed to be the same as the first.
dschulze@659 2499
dschulze@659 2500 <p>See <a
dschulze@659 2501 href="http://www.w3.org/TR/css3-background/#the-border-image-repeat">Image
dschulze@659 2502 Tiling: the ‘<code class=property>border-image-repeat</code>’
dschulze@659 2503 property</a> <a href="#CSS3BG"
dschulze@746 2504 rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a> for the definitions of the
dschulze@659 2505 property values.
dschulze@659 2506
dschulze@659 2507 <p>The exact process for scaling and tiling the mask box image parts is
dschulze@659 2508 given in the section <a href="#masking-with-the-mask-box-image">Masking
dschulze@659 2509 with the mask-box-image</a>.
dschulze@301 2510
dschulze@299 2511 <h3 id=the-mask-box-image><span class=secno>7.6. </span>The ‘<a
dschulze@299 2512 href="#mask-box-image0"><code class=property>mask-box-image</code></a>’
dschulze@299 2513 property</h3>
dschulze@299 2514
dschulze@299 2515 <table class=propdef>
dschulze@299 2516 <tbody>
dschulze@299 2517 <tr>
dschulze@299 2518 <th>Name:
dschulze@299 2519
dschulze@299 2520 <td><dfn id=mask-box-image0>mask-box-image</dfn>
dschulze@299 2521
dschulze@299 2522 <tr>
dschulze@299 2523 <th><a href="#values">Value</a>:
dschulze@299 2524
dschulze@299 2525 <td> <var>&lt;‘<a href="#mask-box-image-source"><code
dschulze@299 2526 class=property>mask-box-image-source</code></a>’&gt;</var> ||
dschulze@299 2527 <var>&lt;‘<a href="#mask-box-image-slice"><code
dschulze@299 2528 class=property>mask-box-image-slice</code></a>’&gt;</var> [ /
dschulze@299 2529 <var>&lt;‘<a href="#mask-box-image-width"><code
dschulze@299 2530 class=property>mask-box-image-width</code></a>’&gt;</var> | /
dschulze@299 2531 <var>&lt;‘<a href="#mask-box-image-width"><code
dschulze@299 2532 class=property>mask-box-image-width</code></a>’&gt;</var>? /
dschulze@299 2533 <var>&lt;‘<a href="#mask-box-image-outset"><code
dschulze@299 2534 class=property>mask-box-image-outset</code></a>’&gt;</var> ]? ||
dschulze@299 2535 <var>&lt;‘<a href="#mask-box-image-repeat"><code
dschulze@299 2536 class=property>mask-box-image-repeat</code></a>’&gt;</var>
dschulze@299 2537
dschulze@299 2538 <tr>
dschulze@299 2539 <th>Initial:
dschulze@299 2540
dschulze@299 2541 <td>See individual properties
dschulze@299 2542
dschulze@299 2543 <tr>
dschulze@299 2544 <th>Applies to:
dschulze@299 2545
dschulze@299 2546 <td>See individual properties
dschulze@299 2547
dschulze@299 2548 <tr>
dschulze@299 2549 <th>Inherited:
dschulze@299 2550
dschulze@299 2551 <td>no
dschulze@299 2552
dschulze@299 2553 <tr>
dschulze@299 2554 <th>Percentages:
dschulze@299 2555
dschulze@299 2556 <td>N/A
dschulze@299 2557
dschulze@299 2558 <tr>
dschulze@299 2559 <th>Media:
dschulze@299 2560
dschulze@299 2561 <td>visual
dschulze@299 2562
dschulze@299 2563 <tr>
dschulze@299 2564 <th>Computed value:
dschulze@299 2565
dschulze@299 2566 <td>See individual properties
dschulze@299 2567
dschulze@299 2568 <tr>
dschulze@299 2569 <th>Animatable:
dschulze@299 2570
dschulze@299 2571 <td>See individual properties
dschulze@299 2572 </table>
dschulze@298 2573
dschulze@301 2574 <p>This is a shorthand property for setting ‘<a
dschulze@301 2575 href="#mask-box-image-source"><code
dschulze@301 2576 class=property>mask-box-image-source</code></a>’, ‘<a
dschulze@301 2577 href="#mask-box-image-slice"><code
dschulze@301 2578 class=property>mask-box-image-slice</code></a>’, ‘<a
dschulze@301 2579 href="#mask-box-image-width"><code
dschulze@301 2580 class=property>mask-box-image-width</code></a>’, ‘<a
dschulze@301 2581 href="#mask-box-image-outset"><code
dschulze@301 2582 class=property>mask-box-image-outset</code></a>’ and ‘<a
dschulze@301 2583 href="#mask-box-image-repeat"><code
dschulze@301 2584 class=property>mask-box-image-repeat</code></a>’. Omitted values are set
dschulze@301 2585 to their initial values.
dschulze@301 2586
dschulze@453 2587 <h3 id=masking-with-the-mask-box-image><span class=secno>7.7.
dschulze@453 2588 </span>Masking with the mask-box-image</h3>
dschulze@453 2589
dschulze@453 2590 <p> After the mask-box-image given by ‘<a
dschulze@453 2591 href="#mask-box-image-source"><code
dschulze@453 2592 class=property>mask-box-image-source</code></a>’ is sliced by the ‘<a
dschulze@453 2593 href="#mask-box-image-slice"><code
dschulze@453 2594 class=property>mask-box-image-slice</code></a>’ values, the resulting
dschulze@453 2595 nine images are scaled, positioned, and tiled into their corresponding
dschulze@659 2596 mask image regions in four steps as described in the section <a
dschulze@659 2597 href="http://www.w3.org/TR/css3-background/#border-image-process">Drawing
dschulze@659 2598 the Border Image</a> <a href="#CSS3BG"
dschulze@659 2599 rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a>.
dschulze@301 2600
dschulze@298 2601 <h2 id=clipping-paths><span class=secno>8. </span>Clipping paths</h2>
dschulze@298 2602
birtles@466 2603 <p> The clipping path restricts the region to which paint can be applied,
birtles@466 2604 the so-called clipping region. Conceptually, any parts of the drawing that
birtles@466 2605 lie outside of this region are not drawn. This includes any content,
birtles@466 2606 background, borders, text decoration, outline and visible scrolling
birtles@466 2607 mechanism of the element to which the clipping path is applied, and those
birtles@466 2608 of its descendants.
birtles@466 2609
birtles@466 2610 <p> An element's ancestors may also clip portions of their content (e.g.,
dschulze@460 2611 via their own ‘<a href="#ClipProperty"><code
dschulze@460 2612 class=property>clip</code></a>’ or ‘<a href="#clip-path"><code
dschulze@460 2613 class=property>clip-path</code></a>’ properties and/or if their ‘<code
dschulze@460 2614 class=property>overflow</code>’ property is not ‘<code
birtles@466 2615 class=css>visible</code>’). What is rendered is the cumulative
dschulze@460 2616 intersection.
dschulze@460 2617
dschulze@460 2618 <p> If the clipping region exceeds the bounds of the UA's document window,
dschulze@460 2619 content may be clipped to that window by the native operating environment.
dschulze@298 2620
dschulze@298 2621 <h3 id=the-clip-path><span class=secno>8.1. </span>The ‘<a
dschulze@298 2622 href="#clip-path"><code class=property>clip-path</code></a>’ property</h3>
dschulze@298 2623
dschulze@298 2624 <table class=propdef>
dschulze@298 2625 <tbody>
dschulze@298 2626 <tr>
dschulze@298 2627 <th>Name:
dschulze@298 2628
dschulze@298 2629 <td><dfn id=clip-path>clip-path</dfn>
dschulze@298 2630
dschulze@298 2631 <tr>
dschulze@298 2632 <th>Value:
dschulze@298 2633
dschulze@338 2634 <td><a href="#ltshapegt"><var>&lt;shape&gt;</var></a> | <a
dschulze@338 2635 href="#ltclip-sourcegt"><var>&lt;clip-source&gt;</var></a> | none
dschulze@298 2636
dschulze@298 2637 <tr>
dschulze@298 2638 <th>Initial:
dschulze@298 2639
dschulze@298 2640 <td>none
dschulze@298 2641
dschulze@298 2642 <tr>
dschulze@298 2643 <th>Applies to:
dschulze@298 2644
dschulze@551 2645 <td>All elements. SVG <a
dschulze@551 2646 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermContainerElement">container
dschulze@551 2647 elements</a>, <a
dschulze@551 2648 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@551 2649 elements</a> and <a class=element-name href="#ClipPathElement">‘<code
dschulze@551 2650 class=property>clipPath</code>’</a>
dschulze@298 2651
dschulze@298 2652 <tr>
dschulze@298 2653 <th>Inherited:
dschulze@298 2654
dschulze@298 2655 <td>no
dschulze@298 2656
dschulze@298 2657 <tr>
dschulze@298 2658 <th>Percentages:
dschulze@298 2659
dschulze@338 2660 <td>as specified
dschulze@298 2661
dschulze@298 2662 <tr>
dschulze@298 2663 <th>Media:
dschulze@298 2664
dschulze@298 2665 <td>visual
dschulze@298 2666
dschulze@298 2667 <tr>
dschulze@342 2668 <th>Computed value:
dschulze@298 2669
dschulze@452 2670 <td>as specified, but with <a href="#lturlgt"><var>&lt;url&gt;</var></a>
dschulze@402 2671 values made absolute
dschulze@298 2672
dschulze@298 2673 <tr>
birtles@440 2674 <th>Animatable:
dschulze@298 2675
dschulze@731 2676 <td>See <a
dschulze@731 2677 href="http://dev.w3.org/csswg/css3-exclusions/#shape-inside">‘<code
dschulze@731 2678 class=property>shape-inside</code>’</a> and <a
dschulze@731 2679 href="http://dev.w3.org/csswg/css3-exclusions/#shape-outside">‘<code
dschulze@731 2680 class=property>shape-outside</code>’</a> <a href="#CSS3-EXCLUSIONS"
dschulze@731 2681 rel=biblioentry>[CSS3-EXCLUSIONS]<!--{{!CSS3-EXCLUSIONS}}--></a>
dschulze@298 2682 </table>
dschulze@298 2683
dschulze@452 2684 <pre class=prod><dfn id=ltclip-sourcegt>&lt;clip-source&gt;</dfn> = <a
birtles@697 2685 href="#lturlgt"><var>&lt;url&gt;</var></a> | <var>child</var> | <a
birtles@697 2686 href="#ltchild-selectorgt"><var>&lt;child-selector&gt;</var></a>
dschulze@453 2687 </pre>
dschulze@338 2688
dschulze@298 2689 <dl>
dschulze@338 2690 <dt> <dfn id=ltshapegt>‘<code class=css>&lt;shape&gt;</code>’</dfn>
dschulze@338 2691
dschulze@552 2692 <dd> A basic shape function as defined in CSS3 Exclusions. The origin of
dschulze@552 2693 clipping shapes is on the top left of the <a class=index
dschulze@338 2694 href="#bounding-client-rect" id=bounding-client-rect0>bounding client
dschulze@552 2695 rect</a>. Percentage values are resolved against the <a class=index
dschulze@552 2696 href="#bounding-client-rect" id=bounding-client-rect1>bounding client
dschulze@552 2697 rect</a> width and height. (See <a href="#CSS3-EXCLUSIONS"
dschulze@342 2698 rel=biblioentry>[CSS3-EXCLUSIONS]<!--{{!CSS3-EXCLUSIONS}}--></a>.)
birtles@697 2699
birtles@697 2700 <dt>‘<code class=css>child</code>’
birtles@697 2701
dschulze@698 2702 <dd> A keyword to indicate that the last direct sibling <a
dschulze@698 2703 class=element-name href="#ClipPathElement">‘<code
dschulze@698 2704 class=property>clipPath</code>’</a> element of the element the ‘<a
dschulze@698 2705 href="#clip-path"><code class=property>clip-path</code></a>’ property
dschulze@698 2706 is applied should be used as the clip source. It is equivalent to
dschulze@698 2707 ‘<code class=css>select(clipPath:last-of-type)</code>’.
birtles@697 2708
birtles@697 2709 <dt>‘<a href="#ltchild-selectorgt"><code
birtles@697 2710 class=css>&lt;child-selector&gt;</code></a>’
birtles@697 2711
birtles@697 2712 <dd> A comma-separated list of <a
birtles@697 2713 href="http://dev.w3.org/csswg/selectors4/#compound">compound
birtles@697 2714 selector</a>s scoped at the element to which the ‘<a
birtles@697 2715 href="#clip-path"><code class=property>clip-path</code></a>’ property
birtles@697 2716 is applied. The first matching element in <a
birtles@697 2717 href="http://www.w3.org/TR/2012/WD-dom-20120405/#concept-tree-order">tree
birtles@697 2718 order</a> (as defined in <a href="#DOM"
birtles@697 2719 rel=biblioentry>[DOM]<!--{{!DOM}}--></a>) as a result of evaluating the
birtles@697 2720 list of selectors is taken as the clip source. If there are no matching
birtles@697 2721 elements the clip source is invalid.
dschulze@298 2722 </dl>
dschulze@298 2723
dschulze@298 2724 <h3 id=the-clip-rule><span class=secno>8.2. </span>The ‘<a
dschulze@298 2725 href="#clip-rule"><code class=property>clip-rule</code></a>’ property</h3>
dschulze@298 2726
dschulze@298 2727 <table class=propdef>
dschulze@298 2728 <tbody>
dschulze@298 2729 <tr>
dschulze@298 2730 <th>Name:
dschulze@298 2731
dschulze@298 2732 <td><dfn id=clip-rule>clip-rule</dfn>
dschulze@298 2733
dschulze@298 2734 <tr>
dschulze@298 2735 <th>Value:
dschulze@298 2736
dschulze@298 2737 <td>nonzero | evenodd
dschulze@298 2738
dschulze@298 2739 <tr>
dschulze@298 2740 <th>Initial:
dschulze@298 2741
dschulze@298 2742 <td>nonzero
dschulze@298 2743
dschulze@298 2744 <tr>
dschulze@298 2745 <th>Applies to:
dschulze@298 2746
dschulze@551 2747 <td><a
dschulze@551 2748 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement">graphics
dschulze@551 2749 elements</a> within a <a class=element-name
dschulze@551 2750 href="#ClipPathElement">‘<code class=property>clipPath</code>’</a>
dschulze@551 2751 element
dschulze@298 2752
dschulze@298 2753 <tr>
dschulze@298 2754 <th>Inherited:
dschulze@298 2755
dschulze@298 2756 <td>yes
dschulze@298 2757
dschulze@298 2758 <tr>
dschulze@298 2759 <th>Percentages:
dschulze@298 2760
dschulze@298 2761 <td>N/A
dschulze@298 2762
dschulze@298 2763 <tr>
dschulze@298 2764 <th>Media:
dschulze@298 2765
dschulze@298 2766 <td>visual
dschulze@298 2767
dschulze@298 2768 <tr>
dschulze@551 2769 <th>Computed value:
dschulze@298 2770
dschulze@298 2771 <td>as specified
dschulze@298 2772
dschulze@298 2773 <tr>
birtles@440 2774 <th>Animatable:
dschulze@298 2775
dschulze@731 2776 <td>no
dschulze@298 2777 </table>
dschulze@298 2778
dschulze@298 2779 <dl>
dschulze@298 2780 <dt><dfn id=nonzero>‘<code class=css>nonzero</code>’</dfn>
dschulze@298 2781
dschulze@551 2782 <dd>See description of <a class=property
dschulze@551 2783 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#FillRuleProperty">‘<code
dschulze@551 2784 class=property>fill-rule</code>’</a> property <a href="#SVG11"
dschulze@551 2785 rel=biblioentry>[SVG11]<!--{{SVG11}}--></a>.
dschulze@298 2786
dschulze@298 2787 <dt><dfn id=evenodd>‘<code class=css>evenodd</code>’</dfn>
dschulze@298 2788
dschulze@551 2789 <dd>See description of <a class=property
dschulze@551 2790 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#FillRuleProperty">‘<code
dschulze@551 2791 class=property>fill-rule</code>’</a> property <a href="#SVG11"
dschulze@551 2792 rel=biblioentry>[SVG11]<!--{{SVG11}}--></a>.
dschulze@298 2793 </dl>
dschulze@298 2794
dschulze@298 2795 <p>The ‘<a href="#clip-rule"><code class=property>clip-rule</code></a>’
dschulze@551 2796 property only applies to graphics elements that are contained within a <a
dschulze@551 2797 class=element-name href="#ClipPathElement">‘<code
dschulze@551 2798 class=property>clipPath</code>’</a> element.
dschulze@298 2799
dschulze@298 2800 <div class=example> The following fragment of code will cause an evenodd
dschulze@298 2801 clipping rule to be applied to the clipping path because ‘<a
dschulze@298 2802 href="#clip-rule"><code class=property>clip-rule</code></a>’ is
dschulze@551 2803 specified on the <a class=element-name
dschulze@551 2804 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathElement">‘<code
dschulze@551 2805 class=property>path</code>’</a> element that defines the clipping shape:
dschulze@551 2806
dschulze@470 2807 <pre>
dschulze@470 2808 &lt;g clip-rule="nonzero"&gt;
dschulze@470 2809 &lt;clipPath id="MyClip"&gt;
dschulze@470 2810 &lt;path d="..." clip-rule="evenodd" /&gt;
dschulze@470 2811 &lt;/clipPath&gt;
dschulze@470 2812 &lt;rect clip-path="url(#MyClip)" ... /&gt;
dschulze@470 2813 &lt;/g&gt;
dschulze@298 2814 </pre>
dschulze@298 2815
dschulze@298 2816 <p>whereas the following fragment of code will <em>not</em> cause an
dschulze@298 2817 evenodd clipping rule to be applied because the ‘<a
dschulze@298 2818 href="#clip-rule"><code class=property>clip-rule</code></a>’ is
dschulze@298 2819 specified on the referencing element, not on the object defining the
dschulze@427 2820 clipping shape:
dschulze@298 2821
dschulze@470 2822 <pre>
dschulze@470 2823 &lt;g clip-rule="nonzero"&gt;
dschulze@470 2824 &lt;clipPath id="MyClip"&gt;
dschulze@470 2825 &lt;path d="..." /&gt;
dschulze@470 2826 &lt;/clipPath&gt;
dschulze@470 2827 &lt;rect clip-path="url(#MyClip)" clip-rule="evenodd" ... /&gt;
dschulze@470 2828 &lt;/g&gt;
dschulze@298 2829 </pre>
dschulze@298 2830 </div>
dschulze@298 2831
dschulze@451 2832 <h3 id=clip-property><span class=secno>8.3. </span>The ‘<a
dschulze@451 2833 href="#ClipProperty"><code class=property>clip</code></a>’ property</h3>
dschulze@451 2834
dschulze@451 2835 <table class=propdef>
dschulze@451 2836 <tbody>
dschulze@451 2837 <tr>
dschulze@451 2838 <th>Name:
dschulze@451 2839
dschulze@451 2840 <td><dfn id=ClipProperty>clip</dfn>
dschulze@451 2841
dschulze@451 2842 <tr>
dschulze@451 2843 <th>Value:
dschulze@451 2844
dschulze@451 2845 <td><a href="#ltshapegt"><var>&lt;shape&gt;</var></a> | auto
dschulze@451 2846
dschulze@451 2847 <tr>
dschulze@451 2848 <th>Initial:
dschulze@451 2849
dschulze@451 2850 <td>see individual properties
dschulze@451 2851
dschulze@451 2852 <tr>
dschulze@451 2853 <th>Applies to:
dschulze@451 2854
dschulze@451 2855 <td>Absolutely positioned elements. In SVG, it applies to <a
dschulze@451 2856 href="http://www.w3.org/TR/SVG2/coords.html#EstablishingANewViewport">elements
dschulze@551 2857 which establish a new viewport</a>, <a class=element-name
dschulze@551 2858 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/pservers.html#PatternElement">‘<code
dschulze@551 2859 class=property>pattern</code>’</a> elements and <a class=element-name
dschulze@551 2860 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#MarkerElement">‘<code
dschulze@551 2861 class=property>marker</code>’</a> elements.
dschulze@451 2862
dschulze@451 2863 <tr>
dschulze@451 2864 <th>Inherited:
dschulze@451 2865
dschulze@451 2866 <td>no
dschulze@451 2867
dschulze@451 2868 <tr>
dschulze@451 2869 <th>Percentages:
dschulze@451 2870
dschulze@451 2871 <td>N/A
dschulze@451 2872
dschulze@451 2873 <tr>
dschulze@451 2874 <th>Media:
dschulze@451 2875
dschulze@451 2876 <td>visual
dschulze@451 2877
dschulze@451 2878 <tr>
dschulze@551 2879 <th>Computed value:
dschulze@451 2880
dschulze@451 2881 <td>as specified
dschulze@451 2882
dschulze@451 2883 <tr>
dschulze@451 2884 <th>Animatable:
dschulze@451 2885
dschulze@731 2886 <td>as <a
dschulze@731 2887 href="http://dev.w3.org/csswg/css3-transitions/#animtype-rect">rectangle</a>
dschulze@451 2888 </table>
dschulze@451 2889
dschulze@474 2890 <p class=note>With this specification the ‘<a href="#ClipProperty"><code
dschulze@474 2891 class=property>clip</code></a>’ property is deprecated. Authors are
dschulze@474 2892 encouraged to use the ‘<a href="#clip-path"><code
dschulze@474 2893 class=property>clip-path</code></a>’ property instead. UAs must support
dschulze@474 2894 the ‘<a href="#ClipProperty"><code class=property>clip</code></a>’
dschulze@474 2895 property.
dschulze@474 2896
dschulze@451 2897 <p> The ‘<a href="#ClipProperty"><code class=property>clip</code></a>’
dschulze@451 2898 property applies only to absolutely positioned elements. In SVG, it
dschulze@451 2899 applies to <a
dschulze@451 2900 href="http://www.w3.org/TR/SVG2/coords.html#EstablishingANewViewport">elements
dschulze@551 2901 which establish a new viewport</a>, <a class=element-name
dschulze@551 2902 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/pservers.html#PatternElement">‘<code
dschulze@551 2903 class=property>pattern</code>’</a> elements and <a class=element-name
dschulze@551 2904 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#MarkerElement">‘<code
dschulze@551 2905 class=property>marker</code>’</a> elements. Values have the following
dschulze@551 2906 meanings:
dschulze@451 2907
dschulze@451 2908 <dl>
dschulze@551 2909 <dt>‘<a href="#auto"><code class=css>auto</code></a>’
dschulze@451 2910
dschulze@451 2911 <dd>The element does not clip.
dschulze@451 2912
dschulze@451 2913 <dt><a href="#ltshapegt"><var>&lt;shape&gt;</var></a>
dschulze@451 2914
dschulze@451 2915 <dd>
dschulze@451 2916 <p> In CSS 2.1, the only valid &lt;shape&gt; value is: rect(<a
dschulze@451 2917 href="#lttopgt"><var>&lt;top&gt;</var></a>, <a
dschulze@451 2918 href="#ltrightgt"><var>&lt;right&gt;</var></a>, <a
dschulze@451 2919 href="#ltbottomgt"><var>&lt;bottom&gt;</var></a>, <a
dschulze@451 2920 href="#ltleftgt"><var>&lt;left&gt;</var></a>) where <a
dschulze@451 2921 href="#lttopgt"><var>&lt;top&gt;</var></a> and <a
dschulze@451 2922 href="#ltbottomgt"><var>&lt;bottom&gt;</var></a> specify offsets from
dschulze@451 2923 the top border edge of the box, and <a
dschulze@451 2924 href="#ltrightgt"><var>&lt;right&gt;</var></a>, and <a
dschulze@451 2925 href="#ltleftgt"><var>&lt;left&gt;</var></a> specify offsets from the
dschulze@451 2926 left border edge of the box. Authors should separate offset values with
dschulze@451 2927 commas. User agents must support separation with commas, but may also
dschulze@451 2928 support separation without commas (but not a combination), because a
dschulze@451 2929 previous revision of this specification was ambiguous in this respect.
dschulze@451 2930
dschulze@451 2931 <p><dfn id=lttopgt>&lt;top&gt;</dfn>, <dfn
dschulze@451 2932 id=ltrightgt>&lt;right&gt;</dfn>, <dfn
dschulze@451 2933 id=ltbottomgt>&lt;bottom&gt;</dfn>, and <dfn
dschulze@451 2934 id=ltleftgt>&lt;left&gt;</dfn> may either have a
dschulze@551 2935 <var>&lt;length&gt;</var> value or ‘<a href="#auto"><code
dschulze@551 2936 class=css>auto</code></a>’. Negative lengths are permitted. The value
dschulze@551 2937 ‘<a href="#auto"><code class=css>auto</code></a>’ means that a given
dschulze@551 2938 edge of the clipping region will be the same as the edge of the
dschulze@551 2939 element's generated border box (i.e., ‘<a href="#auto"><code
dschulze@551 2940 class=css>auto</code></a>’ means the same as ‘<code
dschulze@451 2941 class=css>0</code>’ for <a href="#lttopgt"><var>&lt;top&gt;</var></a>
dschulze@451 2942 and <a href="#ltleftgt"><var>&lt;left&gt;</var></a>, the same as the
dschulze@451 2943 used value of the height plus the sum of vertical padding and border
dschulze@451 2944 widths for <a href="#ltbottomgt"><var>&lt;bottom&gt;</var></a>, and the
dschulze@451 2945 same as the used value of the width plus the sum of the horizontal
dschulze@451 2946 padding and border widths for <a
dschulze@551 2947 href="#ltrightgt"><var>&lt;right&gt;</var></a>, such that four ‘<a
dschulze@551 2948 href="#auto"><code class=property>auto</code></a>’ values result in
dschulze@551 2949 the clipping region being the same as the element's border box).
dschulze@451 2950
dschulze@451 2951 <p> When coordinates are rounded to pixel coordinates, care should be
dschulze@451 2952 taken that no pixels remain visible when <a
dschulze@451 2953 href="#ltleftgt"><var>&lt;left&gt;</var></a> and <a
dschulze@451 2954 href="#ltrightgt"><var>&lt;right&gt;</var></a> have the same value (or
dschulze@451 2955 <a href="#lttopgt"><var>&lt;top&gt;</var></a> and <a
dschulze@451 2956 href="#ltbottomgt"><var>&lt;bottom&gt;</var></a> have the same value),
dschulze@451 2957 and conversely that no pixels within the element's border box remain
dschulze@551 2958 hidden when these values are ‘<a href="#auto"><code
dschulze@551 2959 class=css>auto</code></a>’.
dschulze@451 2960 </dl>
dschulze@451 2961
dschulze@451 2962 <div class=example>
dschulze@451 2963 <p> Example: The following two rules:
dschulze@451 2964
dschulze@470 2965 <pre><code>
dschulze@470 2966 p#one { clip: rect(5px, 40px, 45px, 5px); }
dschulze@451 2967 p#two { clip: rect(5px, 55px, 45px, 5px); }</code></pre>
dschulze@451 2968
dschulze@451 2969 <p> and assuming both Ps are 50 by 55 pixel, will create, respectively,
dschulze@451 2970 the rectangular clipping regions delimited by the dashed lines in the
dschulze@451 2971 following illustrations:
dschulze@451 2972
dschulze@451 2973 <div class=figure> <img alt="Values for rect shape" height=577
dschulze@451 2974 src="images/clip.png" width=292>
dschulze@451 2975 <p class=caption>This diagram illustrates two block boxes, one above the
dschulze@451 2976 other, with rectangular clipping regions of different dimensions. (See
dschulze@451 2977 <a href="http://www.w3.org/TR/CSS2/images/longdesc/clip-desc.html">long
dschulze@451 2978 description</a>.)
dschulze@451 2979 </div>
dschulze@451 2980 </div>
dschulze@451 2981
dschulze@551 2982 <h3 id=ClipPathElement><span class=secno>8.4. </span>The <a
dschulze@551 2983 class=element-name href="#ClipPathElement">‘<code
dschulze@551 2984 class=property>clipPath</code>’</a> element</h3>
dschulze@551 2985
dschulze@551 2986 <table class=propdef summary="clipPath element">
dschulze@551 2987 <tbody>
dschulze@551 2988 <tr>
dschulze@551 2989 <th>Name:
dschulze@551 2990
dschulze@551 2991 <td><dfn id=clippath>clipPath</dfn>
dschulze@551 2992
dschulze@551 2993 <tr>
dschulze@551 2994 <th>Categories:
dschulze@551 2995
dschulze@551 2996 <td>None.
dschulze@551 2997
dschulze@551 2998 <tr>
dschulze@551 2999 <th>Content model:
dschulze@551 3000
dschulze@551 3001 <td>Any number of the following elements, in any order:
dschulze@551 3002 <ul class=no-bullets>
dschulze@551 3003 <li><a
dschulze@551 3004 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermDescriptiveElement">descriptive</a>
dschulze@551 3005 <span class=expanding> — <a
dschulze@551 3006 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#DescElement"><span
dschulze@551 3007 class=element-name>‘desc’</span></a>, <a
dschulze@551 3008 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#TitleElement"><span
dschulze@551 3009 class=element-name>‘title’</span></a>, <a
dschulze@551 3010 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/metadata.html#MetadataElement"><span
dschulze@551 3011 class=element-name>‘metadata’</span></a></span>
dschulze@551 3012
dschulze@551 3013 <li><a
dschulze@551 3014 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermAnimationElement">animation</a>
dschulze@551 3015 <span class=expanding> — <a
dschulze@551 3016 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/animate.html#AnimateElement"><span
dschulze@551 3017 class=element-name>‘animate’</span></a>, <a
dschulze@551 3018 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/animate.html#AnimateColorElement"><span
dschulze@551 3019 class=element-name>‘animateColor’</span></a>, <a
dschulze@551 3020 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/animate.html#AnimateMotionElement"><span
dschulze@551 3021 class=element-name>‘animateMotion’</span></a>, <a
dschulze@551 3022 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/animate.html#AnimateTransformElement"><span
dschulze@551 3023 class=element-name>‘animateTransform’</span></a>, <a
dschulze@551 3024 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/animate.html#SetElement"><span
dschulze@551 3025 class=element-name>‘set’</span></a></span>
dschulze@551 3026
dschulze@551 3027 <li><a
dschulze@551 3028 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermShapeElement">shape</a>
dschulze@551 3029 <span class=expanding> — <a
dschulze@551 3030 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#CircleElement"><span
dschulze@551 3031 class=element-name>‘circle’</span></a>, <a
dschulze@551 3032 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#EllipseElement"><span
dschulze@551 3033 class=element-name>‘ellipse’</span></a>, <a
dschulze@551 3034 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#LineElement"><span
dschulze@551 3035 class=element-name>‘line’</span></a>, <a
dschulze@551 3036 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathElement"><span
dschulze@551 3037 class=element-name>‘path’</span></a>, <a
dschulze@551 3038 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#PolygonElement"><span
dschulze@551 3039 class=element-name>‘polygon’</span></a>, <a
dschulze@551 3040 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#PolylineElement"><span
dschulze@551 3041 class=element-name>‘polyline’</span></a>, <a
dschulze@551 3042 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#RectElement"><span
dschulze@551 3043 class=element-name>‘rect’</span></a></span>
dschulze@551 3044
dschulze@551 3045 <li><a
dschulze@551 3046 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#TextElement"><span
dschulze@551 3047 class=element-name>‘text’</span></a>
dschulze@551 3048
dschulze@551 3049 <li><a
dschulze@551 3050 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#UseElement"><span
dschulze@551 3051 class=element-name>‘use’</span></a>
dschulze@551 3052 </ul>
dschulze@551 3053
dschulze@551 3054 <tr>
dschulze@551 3055 <th>Attributes:
dschulze@551 3056
dschulze@551 3057 <td>
dschulze@551 3058 <ul class=no-bullets>
dschulze@551 3059 <li><a
dschulze@551 3060 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermConditionalProcessingAttribute">conditional
dschulze@551 3061 processing attributes</a><span class=expanding> — <a
dschulze@551 3062 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#RequiredFeaturesAttribute"><span
dschulze@551 3063 class=attr-name>‘requiredFeatures’</span></a>, <a
dschulze@551 3064 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#RequiredExtensionsAttribute"><span
dschulze@551 3065 class=attr-name>‘requiredExtensions’</span></a>, <a
dschulze@551 3066 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#SystemLanguageAttribute"><span
dschulze@551 3067 class=attr-name>‘systemLanguage’</span></a></span>
dschulze@551 3068
dschulze@551 3069 <li><a
dschulze@551 3070 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermCoreAttributes">core
dschulze@551 3071 attributes</a><span class=expanding> — <a
dschulze@551 3072 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#IDAttribute"><span
dschulze@551 3073 class=attr-name>‘id’</span></a>, <a
dschulze@551 3074 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#XMLBaseAttribute"><span
dschulze@551 3075 class=attr-name>‘xml:base’</span></a>, <a
dschulze@551 3076 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#XMLLangAttribute"><span
dschulze@551 3077 class=attr-name>‘xml:lang’</span></a>, <a
dschulze@551 3078 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#XMLSpaceAttribute"><span
dschulze@551 3079 class=attr-name>‘xml:space’</span></a></span>
dschulze@551 3080
dschulze@551 3081 <li><a
dschulze@551 3082 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermPresentationAttribute">presentation
dschulze@551 3083 attributes</a><span class=expanding> — <a
dschulze@551 3084 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#AlignmentBaselineProperty"><span
dschulze@551 3085 class=attr-name>‘alignment-baseline’</span></a>, <a
dschulze@551 3086 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#BaselineShiftProperty"><span
dschulze@551 3087 class=attr-name>‘baseline-shift’</span></a>, <a
dschulze@551 3088 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/masking.html#ClipProperty"><span
dschulze@551 3089 class=attr-name>‘clip’</span></a>, <a
dschulze@551 3090 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/masking.html#ClipPathProperty"><span
dschulze@551 3091 class=attr-name>‘clip-path’</span></a>, <a
dschulze@551 3092 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/masking.html#ClipRuleProperty"><span
dschulze@551 3093 class=attr-name>‘clip-rule’</span></a>, <a
dschulze@551 3094 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/color.html#ColorProperty"><span
dschulze@551 3095 class=attr-name>‘color’</span></a>, <a
dschulze@551 3096 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#ColorInterpolationProperty"><span
dschulze@551 3097 class=attr-name>‘color-interpolation’</span></a>, <a
dschulze@551 3098 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#ColorInterpolationFiltersProperty"><span
dschulze@551 3099 class=attr-name>‘color-interpolation-filters’</span></a>, <a
dschulze@551 3100 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/color.html#ColorProfileProperty"><span
dschulze@551 3101 class=attr-name>‘color-profile’</span></a>, <a
dschulze@551 3102 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#ColorRenderingProperty"><span
dschulze@551 3103 class=attr-name>‘color-rendering’</span></a>, <a
dschulze@551 3104 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/interact.html#CursorProperty"><span
dschulze@551 3105 class=attr-name>‘cursor’</span></a>, <a
dschulze@551 3106 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#DirectionProperty"><span
dschulze@551 3107 class=attr-name>‘direction’</span></a>, <a
dschulze@551 3108 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#DisplayProperty"><span
dschulze@551 3109 class=attr-name>‘display’</span></a>, <a
dschulze@551 3110 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#DominantBaselineProperty"><span
dschulze@551 3111 class=attr-name>‘dominant-baseline’</span></a>, <a
dschulze@551 3112 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#EnableBackgroundProperty"><span
dschulze@551 3113 class=attr-name>‘enable-background’</span></a>, <a
dschulze@551 3114 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#FillProperty"><span
dschulze@551 3115 class=attr-name>‘fill’</span></a>, <a
dschulze@551 3116 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#FillOpacityProperty"><span
dschulze@551 3117 class=attr-name>‘fill-opacity’</span></a>, <a
dschulze@551 3118 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#FillRuleProperty"><span
dschulze@551 3119 class=attr-name>‘fill-rule’</span></a>, <a
dschulze@551 3120 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#FilterProperty"><span
dschulze@551 3121 class=attr-name>‘filter’</span></a>, <a
dschulze@551 3122 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#FloodColorProperty"><span
dschulze@551 3123 class=attr-name>‘flood-color’</span></a>, <a
dschulze@551 3124 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#FloodOpacityProperty"><span
dschulze@551 3125 class=attr-name>‘flood-opacity’</span></a>, <a
dschulze@551 3126 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#FontProperty"><span
dschulze@551 3127 class=attr-name>‘font’</span></a>, <a
dschulze@551 3128 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#FontFamilyProperty"><span
dschulze@551 3129 class=attr-name>‘font-family’</span></a>, <a
dschulze@551 3130 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#FontSizeProperty"><span
dschulze@551 3131 class=attr-name>‘font-size’</span></a>, <a
dschulze@551 3132 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#FontSizeAdjustProperty"><span
dschulze@551 3133 class=attr-name>‘font-size-adjust’</span></a>, <a
dschulze@551 3134 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#FontStretchProperty"><span
dschulze@551 3135 class=attr-name>‘font-stretch’</span></a>, <a
dschulze@551 3136 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#FontStyleProperty"><span
dschulze@551 3137 class=attr-name>‘font-style’</span></a>, <a
dschulze@551 3138 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#FontVariantProperty"><span
dschulze@551 3139 class=attr-name>‘font-variant’</span></a>, <a
dschulze@551 3140 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#FontWeightProperty"><span
dschulze@551 3141 class=attr-name>‘font-weight’</span></a>, <a
dschulze@551 3142 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#GlyphOrientationHorizontalProperty"><span
dschulze@551 3143 class=attr-name>‘glyph-orientation-horizontal’</span></a>, <a
dschulze@551 3144 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#GlyphOrientationVerticalProperty"><span
dschulze@551 3145 class=attr-name>‘glyph-orientation-vertical’</span></a>, <a
dschulze@551 3146 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#ImageRenderingProperty"><span
dschulze@551 3147 class=attr-name>‘image-rendering’</span></a>, <a
dschulze@551 3148 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#KerningProperty"><span
dschulze@551 3149 class=attr-name>‘kerning’</span></a>, <a
dschulze@551 3150 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#LetterSpacingProperty"><span
dschulze@551 3151 class=attr-name>‘letter-spacing’</span></a>, <a
dschulze@551 3152 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#LightingColorProperty"><span
dschulze@551 3153 class=attr-name>‘lighting-color’</span></a>, <a
dschulze@551 3154 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#MarkerProperty"><span
dschulze@551 3155 class=attr-name>‘marker’</span></a>, <a
dschulze@551 3156 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#MarkerEndProperty"><span
dschulze@551 3157 class=attr-name>‘marker-end’</span></a>, <a
dschulze@551 3158 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#MarkerMidProperty"><span
dschulze@551 3159 class=attr-name>‘marker-mid’</span></a>, <a
dschulze@551 3160 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#MarkerStartProperty"><span
dschulze@551 3161 class=attr-name>‘marker-start’</span></a>, <a
dschulze@551 3162 href="#MaskProperty"><span class=attr-name>‘mask’</span></a>, <a
dschulze@551 3163 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/masking.html#OpacityProperty"><span
dschulze@551 3164 class=attr-name>‘opacity’</span></a>, <a
dschulze@551 3165 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/masking.html#OverflowProperty"><span
dschulze@551 3166 class=attr-name>‘overflow’</span></a>, <a
dschulze@551 3167 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/interact.html#PointerEventsProperty"><span
dschulze@551 3168 class=attr-name>‘pointer-events’</span></a>, <a
dschulze@551 3169 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#ShapeRenderingProperty"><span
dschulze@551 3170 class=attr-name>‘shape-rendering’</span></a>, <a
dschulze@551 3171 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/pservers.html#StopColorProperty"><span
dschulze@551 3172 class=attr-name>‘stop-color’</span></a>, <a
dschulze@551 3173 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/pservers.html#StopOpacityProperty"><span
dschulze@551 3174 class=attr-name>‘stop-opacity’</span></a>, <a
dschulze@551 3175 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#StrokeProperty"><span
dschulze@551 3176 class=attr-name>‘stroke’</span></a>, <a
dschulze@551 3177 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#StrokeDasharrayProperty"><span
dschulze@551 3178 class=attr-name>‘stroke-dasharray’</span></a>, <a
dschulze@551 3179 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#StrokeDashoffsetProperty"><span
dschulze@551 3180 class=attr-name>‘stroke-dashoffset’</span></a>, <a
dschulze@551 3181 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#StrokeLinecapProperty"><span
dschulze@551 3182 class=attr-name>‘stroke-linecap’</span></a>, <a
dschulze@551 3183 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#StrokeLinejoinProperty"><span
dschulze@551 3184 class=attr-name>‘stroke-linejoin’</span></a>, <a
dschulze@551 3185 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#StrokeMiterlimitProperty"><span
dschulze@551 3186 class=attr-name>‘stroke-miterlimit’</span></a>, <a
dschulze@551 3187 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#StrokeOpacityProperty"><span
dschulze@551 3188 class=attr-name>‘stroke-opacity’</span></a>, <a
dschulze@551 3189 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#StrokeWidthProperty"><span
dschulze@551 3190 class=attr-name>‘stroke-width’</span></a>, <a
dschulze@551 3191 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#TextAnchorProperty"><span
dschulze@551 3192 class=attr-name>‘text-anchor’</span></a>, <a
dschulze@551 3193 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#TextDecorationProperty"><span
dschulze@551 3194 class=attr-name>‘text-decoration’</span></a>, <a
dschulze@551 3195 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#TextRenderingProperty"><span
dschulze@551 3196 class=attr-name>‘text-rendering’</span></a>, <a
dschulze@551 3197 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#UnicodeBidiProperty"><span
dschulze@551 3198 class=attr-name>‘unicode-bidi’</span></a>, <a
dschulze@551 3199 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#VisibilityProperty"><span
dschulze@551 3200 class=attr-name>‘visibility’</span></a>, <a
dschulze@551 3201 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#WordSpacingProperty"><span
dschulze@551 3202 class=attr-name>‘word-spacing’</span></a>, <a
dschulze@551 3203 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#WritingModeProperty"><span
dschulze@551 3204 class=attr-name>‘writing-mode’</span></a></span>
dschulze@551 3205
dschulze@551 3206 <li><a
dschulze@551 3207 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/styling.html#ClassAttribute"><span
dschulze@551 3208 class=attr-name>‘class’</span></a>
dschulze@551 3209
dschulze@551 3210 <li><a
dschulze@551 3211 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/styling.html#StyleAttribute"><span
dschulze@551 3212 class=attr-name>‘style’</span></a>
dschulze@551 3213
dschulze@551 3214 <li><a
dschulze@551 3215 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#ExternalResourcesRequiredAttribute"><span
dschulze@551 3216 class=attr-name>‘externalResourcesRequired’</span></a>
dschulze@551 3217
dschulze@551 3218 <li><a
dschulze@551 3219 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/coords.html#TransformAttribute"><span
dschulze@551 3220 class=attr-name>‘transform’</span></a>
dschulze@551 3221
dschulze@551 3222 <li><a href="#ClipPathElementClipPathUnitsAttribute"><span
dschulze@551 3223 class=attr-name>‘clipPathUnits’</span></a>
dschulze@551 3224 </ul>
dschulze@551 3225
dschulze@551 3226 <tr>
dschulze@551 3227 <th>DOM Interfaces:
dschulze@551 3228
dschulze@551 3229 <td><a class=idlinterface
dschulze@551 3230 href="#InterfaceSVGClipPathElement">SVGClipPathElement</a>
dschulze@551 3231 </table>
dschulze@298 3232
dschulze@298 3233 <div class=adef-list>
dschulze@427 3234 <p><em>Attribute definitions:</em>
dschulze@298 3235
dschulze@298 3236 <dl>
dschulze@298 3237 <dt id=ClipPathElementClipPathUnitsAttribute><span
dschulze@298 3238 class=adef>clipPathUnits</span> = "<em>userSpaceOnUse</em> |
dschulze@298 3239 <em>objectBoundingBox</em>"
dschulze@298 3240
dschulze@551 3241 <dd>Defines the coordinate system for the contents of the <a
dschulze@551 3242 class=element-name href="#ClipPathElement">‘<code
dschulze@298 3243 class=property>clipPath</code>’</a>.<br>
dschulze@298 3244 If <span class=attr-value>clipPathUnits="userSpaceOnUse"</span>, the
dschulze@551 3245 contents of the <a class=element-name href="#ClipPathElement">‘<code
dschulze@551 3246 class=property>clipPath</code>’</a> represent values in the current
dschulze@551 3247 user coordinate system in place at the time when the <a
dschulze@551 3248 class=element-name href="#ClipPathElement">‘<code
dschulze@551 3249 class=property>clipPath</code>’</a> element is referenced (i.e., the
dschulze@551 3250 user coordinate system for the element referencing the <a
dschulze@551 3251 class=element-name href="#ClipPathElement">‘<code
dschulze@551 3252 class=property>clipPath</code>’</a> element via the <a class=property
dschulze@551 3253 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/masking.html#ClipPathProperty">‘<code
dschulze@551 3254 class=property>clip-path</code>’</a> property).<br>
dschulze@298 3255 If <span class=attr-value>clipPathUnits="objectBoundingBox"</span>, then
dschulze@551 3256 the user coordinate system for the contents of the <a class=element-name
dschulze@551 3257 href="#ClipPathElement">‘<code class=property>clipPath</code>’</a>
dschulze@551 3258 element is established using the bounding box of the element to which
dschulze@551 3259 the clipping path is applied (see <a class=index
dschulze@551 3260 href="#object-bounding-box-units" id=object-bounding-box-units0>object
dschulze@551 3261 bounding box units</a>).<br>
dschulze@551 3262 If attribute <a class=attr-name
dschulze@551 3263 href="#ClipPathElementClipPathUnitsAttribute">‘<code
dschulze@551 3264 class=property>clipPathUnits</code>’</a> is not specified, then the
dschulze@551 3265 effect is as if a value of <span class=attr-value>‘<code
dschulze@551 3266 class=property>userSpaceOnUse</code>’</span> were specified.<br>
dschulze@343 3267 <span class=anim-target>Animatable: yes.</span>
dschulze@298 3268 </dl>
dschulze@298 3269 </div>
dschulze@298 3270
dschulze@551 3271 <p>CSS properties inherit into the <a class=element-name
dschulze@551 3272 href="#ClipPathElement">‘<code class=property>clipPath</code>’</a>
dschulze@551 3273 element from its ancestors; properties do <em>not</em> inherit from the
dschulze@551 3274 element referencing the <a class=element-name
dschulze@551 3275 href="#ClipPathElement">‘<code class=property>clipPath</code>’</a>
dschulze@551 3276 element.
dschulze@551 3277
dschulze@551 3278 <p><a class=element-name href="#ClipPathElement">‘<code
dschulze@551 3279 class=property>clipPath</code>’</a> elements are never rendered
dschulze@551 3280 directly; their only usage is as something that can be referenced using
dschulze@551 3281 the <a class=property
dschulze@551 3282 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/masking.html#ClipPathProperty">‘<code
dschulze@551 3283 class=property>clip-path</code>’</a> property. The <a class=property
dschulze@551 3284 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#DisplayProperty">‘<code
dschulze@551 3285 class=property>display</code>’</a> property does not apply to the <a
dschulze@551 3286 class=element-name href="#ClipPathElement">‘<code
dschulze@551 3287 class=property>clipPath</code>’</a> element; thus, <a class=element-name
dschulze@551 3288 href="#ClipPathElement">‘<code class=property>clipPath</code>’</a>
dschulze@551 3289 elements are not directly rendered even if the ‘<code
dschulze@551 3290 class=property>display</code>’ property is set to a value other than <a
dschulze@551 3291 class=prop-value href="#none">none</a>, and <a class=element-name
dschulze@551 3292 href="#ClipPathElement">‘<code class=property>clipPath</code>’</a>
dschulze@551 3293 elements are available for referencing even when the <a class=property
dschulze@551 3294 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#DisplayProperty">‘<code
dschulze@551 3295 class=property>display</code>’</a> property on the <a class=element-name
dschulze@551 3296 href="#ClipPathElement">‘<code class=property>clipPath</code>’</a>
dschulze@551 3297 element or any of its ancestors is set to <a class=prop-value
dschulze@344 3298 href="#none">none</a>.
dschulze@298 3299
dschulze@551 3300 <p>A <a class=element-name href="#ClipPathElement">‘<code
dschulze@551 3301 class=property>clipPath</code>’</a> element can contain <a
dschulze@551 3302 class=element-name
dschulze@551 3303 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathElement">‘<code
dschulze@551 3304 class=property>path</code>’</a> elements, <a class=element-name
dschulze@551 3305 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#TextElement">‘<code
dschulze@551 3306 class=property>text</code>’</a> elements, <a
dschulze@551 3307 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermBasicShapeElement">basic
dschulze@551 3308 shapes</a> (such as <a class=element-name
dschulze@551 3309 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#CircleElement">‘<code
dschulze@551 3310 class=property>circle</code>’</a>) or a <a class=element-name
dschulze@551 3311 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#UseElement">‘<code
dschulze@551 3312 class=property>use</code>’</a> element. If a <a class=element-name
dschulze@551 3313 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#UseElement">‘<code
dschulze@551 3314 class=property>use</code>’</a> element is a child of a <a
dschulze@551 3315 class=element-name href="#ClipPathElement">‘<code
dschulze@298 3316 class=property>clipPath</code>’</a> element, it must directly reference
dschulze@551 3317 <a class=element-name
dschulze@551 3318 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathElement">‘<code
dschulze@551 3319 class=property>path</code>’</a>, <a class=element-name
dschulze@551 3320 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#TextElement">‘<code
dschulze@551 3321 class=property>text</code>’</a> or <a
dschulze@551 3322 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermBasicShapeElement">basic
dschulze@551 3323 shapes</a> elements. Indirect references are an error and the <a
dschulze@551 3324 class=element-name href="#ClipPathElement">‘<code
dschulze@451 3325 class=property>clipPath</code>’</a> element must be ignored.
dschulze@298 3326
dschulze@298 3327 <p>The raw geometry of each child element exclusive of rendering properties
dschulze@659 3328 such as ‘<code class=property>fill</code>’, ‘<code
dschulze@298 3329 class=property>stroke</code>’, ‘<code
dschulze@551 3330 class=property>stroke-width</code>’ within a <a class=element-name
dschulze@551 3331 href="#ClipPathElement">‘<code class=property>clipPath</code>’</a>
dschulze@551 3332 conceptually defines a 1-bit mask (with the possible exception of
dschulze@551 3333 anti-aliasing along the edge of the geometry) which represents the
dschulze@551 3334 silhouette of the graphics associated with that element. Anything outside
dschulze@551 3335 the outline of the object is masked out. If a child element is made
dschulze@551 3336 invisible by ‘<code class=property>display</code>’ or ‘<code
dschulze@298 3337 class=property>visibility</code>’ it does not contribute to the clipping
dschulze@551 3338 path. When the <a class=element-name href="#ClipPathElement">‘<code
dschulze@551 3339 class=property>clipPath</code>’</a> element contains multiple child
dschulze@551 3340 elements, the silhouettes of the child elements are logically OR'd
dschulze@551 3341 together to create a single silhouette which is then used to restrict the
dschulze@551 3342 region onto which paint can be applied. Thus, a point is inside the
dschulze@551 3343 clipping path if it is inside any of the children of the <a
dschulze@551 3344 class=element-name href="#ClipPathElement">‘<code
dschulze@551 3345 class=property>clipPath</code>’</a>.
dschulze@298 3346
dschulze@298 3347 <p>For a given graphics element, the actual clipping path used will be the
dschulze@298 3348 intersection of the clipping path specified by its ‘<a
dschulze@298 3349 href="#clip-path"><code class=property>clip-path</code></a>’ property
dschulze@298 3350 (if any) with any clipping paths on its ancestors, as specified by the
dschulze@298 3351 ‘<a href="#clip-path"><code class=property>clip-path</code></a>’
dschulze@343 3352 property on the elements which establish a new viewport. (See <a
dschulze@343 3353 href="#SVG11" rel=biblioentry>[SVG11]<!--{{SVG11}}--></a>)
dschulze@298 3354
dschulze@734 3355 <p>A couple of additions:
dschulze@734 3356
dschulze@734 3357 <ul>
dschulze@734 3358 <li>The <a class=element-name href="#ClipPathElement">‘<code
dschulze@734 3359 class=property>clipPath</code>’</a> element itself and its child
dschulze@734 3360 elements do <em>not</em> inherit clipping paths from the ancestors of the
dschulze@734 3361 <a class=element-name href="#ClipPathElement">‘<code
dschulze@734 3362 class=property>clipPath</code>’</a> element.
dschulze@734 3363
dschulze@734 3364 <li>The <a class=element-name href="#ClipPathElement">‘<code
dschulze@734 3365 class=property>clipPath</code>’</a> element or any of its children can
dschulze@734 3366 specify property ‘<a href="#clip-path"><code
dschulze@734 3367 class=property>clip-path</code></a>’.<br>
dschulze@734 3368 If a valid ‘<a href="#clip-path"><code
dschulze@734 3369 class=property>clip-path</code></a>’ reference is placed on a <a
dschulze@734 3370 class=element-name href="#ClipPathElement">‘<code
dschulze@734 3371 class=property>clipPath</code>’</a> element, the resulting clipping
dschulze@734 3372 path is the intersection of the contents of the <a class=element-name
dschulze@734 3373 href="#ClipPathElement">‘<code class=property>clipPath</code>’</a>
dschulze@734 3374 element with the referenced clipping path.<br>
dschulze@734 3375 If a valid ‘<a href="#clip-path"><code
dschulze@734 3376 class=property>clip-path</code></a>’ reference is placed on one of the
dschulze@734 3377 children of a <a class=element-name href="#ClipPathElement">‘<code
dschulze@734 3378 class=property>clipPath</code>’</a> element, then the given child
dschulze@734 3379 element is clipped by the referenced clipping path before OR'ing the
dschulze@734 3380 silhouette of the child element with the silhouettes of the other child
dschulze@734 3381 elements.
dschulze@734 3382
dschulze@734 3383 <li>An empty clipping path will completely clip away the element that had
dschulze@734 3384 the ‘<a href="#clip-path"><code class=property>clip-path</code></a>’
dschulze@734 3385 property applied.
dschulze@734 3386 </ul>
dschulze@298 3387
dschulze@451 3388 <h3 id=clipPath-geometry><span class=secno>8.5. </span>Clipping paths,
dschulze@298 3389 geometry, and pointer events</h3>
dschulze@298 3390
dschulze@298 3391 <p>A clipping path is conceptually equivalent to a custom viewport for the
dschulze@298 3392 referencing element. Thus, it affects the rendering of an element, but not
dschulze@298 3393 the element's inherent geometry. The <a class=index
dschulze@552 3394 href="#bounding-client-rect" id=bounding-client-rect2>bounding client
dschulze@551 3395 rect</a> of a clipped element (that is, an element which references a <a
dschulze@551 3396 class=element-name href="#ClipPathElement">‘<code
dschulze@551 3397 class=property>clipPath</code>’</a> element via a ‘<a
dschulze@298 3398 href="#clip-path"><code class=property>clip-path</code></a>’ property,
dschulze@298 3399 or a child of the referencing element) must remain the same as if it were
dschulze@298 3400 not clipped.
dschulze@298 3401
dschulze@551 3402 <p>By default, <a
dschulze@551 3403 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/interact.html#PointerEventsProperty">pointer
dschulze@551 3404 events</a> must not be dispatched on the clipped (non-visible) regions of
dschulze@551 3405 a shape. For example, a circle with a radius of 10 which is clipped to a
dschulze@551 3406 circle with a radius of 5 will not receive <span class=event-name>‘<code
dschulze@551 3407 class=property>click</code>’</span> events outside the smaller radius.
dschulze@551 3408 Later versions of this specification may define new properties to enable
dschulze@551 3409 fine-grained control over the interactions between hit testing and
dschulze@551 3410 clipping.
dschulze@298 3411
dschulze@473 3412 <h2 id=security><span class=secno>9. </span>Security</h2>
dschulze@473 3413
dschulze@473 3414 <h3 id=origin-restrictions><span class=secno>9.1. </span>Origin
dschulze@473 3415 Restrictions</h3>
dschulze@473 3416
dschulze@551 3417 <p> External references to resources like <a class=element-name
dschulze@551 3418 href="#MaskElement">‘<code class=property>mask</code>’</a> or <a
dschulze@551 3419 class=element-name href="#ClipPathElement">‘<code
dschulze@551 3420 class=property>clipPath</code>’</a> must not violate the same origin
dschulze@551 3421 restrictions <a href="#CORS" rel=biblioentry>[CORS]<!--{{!CORS}}--></a>.
dschulze@473 3422
dschulze@473 3423 <p>This restriction includes:
dschulze@473 3424
dschulze@473 3425 <ul>
dschulze@473 3426 <li>Any images, either as content or via styling, that are not exposed
dschulze@473 3427 with CORS
dschulze@473 3428
dschulze@473 3429 <li>Any tainted canvas
dschulze@473 3430
dschulze@473 3431 <li>Any cross-origin content referenced by ‘<code
dschulze@473 3432 class=css>xlink:href</code>’ or &lt;use&gt;
dschulze@473 3433 </ul>
dschulze@473 3434
dschulze@473 3435 <p> If content falls under this restriction, the resource must be rejected.
dschulze@473 3436 The element is drawn as if the resource was not specified (i.e. the ‘<a
dschulze@473 3437 href="#clip-path"><code class=property>clip-path</code></a>’ or ‘<a
dschulze@551 3438 href="#mask"><code class=property>mask</code></a>’ property were set to
dschulze@551 3439 ‘<a href="#none"><code class=css>none</code></a>’).
dschulze@473 3440
dschulze@473 3441 <h2 id=DOMInterfaces><span class=secno>10. </span>DOM interfaces</h2>
dschulze@473 3442
dschulze@473 3443 <h3 id=InterfaceSVGClipPathElement><span class=secno>10.1. </span>Interface
dschulze@462 3444 SVGClipPathElement</h3>
dschulze@464 3445
dschulze@551 3446 <p>The <a href="#InterfaceSVGClipPathElement">SVGClipPathElement</a>
dschulze@551 3447 interface corresponds to the <a class=element-name
dschulze@551 3448 href="#ClipPathElement">‘<code class=property>clipPath</code>’</a>
dschulze@551 3449 element.
dschulze@551 3450
dschulze@551 3451 <pre class=idl>interface <b>SVGClipPathElement</b> : <a
dschulze@628 3452 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGElement">SVGElement</a> {
dschulze@551 3453 readonly attribute <a
dschulze@551 3454 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedEnumeration">SVGAnimatedEnumeration</a> <a
dschulze@470 3455 href="#SVGClipPathElement__clipPathUnits">clipPathUnits</a>;
dschulze@628 3456 readonly attribute <a
dschulze@628 3457 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/coords.html#InterfaceSVGAnimatedTransformList">SVGAnimatedTransformList</a> <a
dschulze@628 3458 href="#SVGClipPathElement__transform">transform</a>;
dschulze@470 3459 };
dschulze@470 3460
dschulze@551 3461 <a
dschulze@551 3462 href="#InterfaceSVGClipPathElement">SVGClipPathElement</a> implements <a
dschulze@551 3463 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGUnitTypes">SVGUnitTypes</a>;</pre>
dschulze@462 3464
dschulze@462 3465 <dl class=interface>
dschulze@462 3466 <dt class=attributes-header>Attributes:
dschulze@462 3467
dschulze@462 3468 <dd>
dschulze@462 3469 <dl class=attributes>
dschulze@462 3470 <dt class="attribute first-child"
dschulze@464 3471 id="SVGClipPathElement__clipPathUnits"><b>clipPathUnits</b><span
dschulze@551 3472 class=idl-type-parenthetical> (readonly <a
dschulze@551 3473 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedEnumeration">SVGAnimatedEnumeration</a>)</span>
dschulze@462 3474
dschulze@462 3475 <dd class=attribute>
dschulze@551 3476 <div> Corresponds to attribute <a class=attr-name
dschulze@551 3477 href="#ClipPathElementClipPathUnitsAttribute">‘<code
dschulze@551 3478 class=property>clipPathUnits</code>’</a> on the given <a
dschulze@551 3479 class=element-name href="#ClipPathElement">‘<code
dschulze@462 3480 class=property>clipPath</code>’</a> element. Takes one of the
dschulze@551 3481 constants defined in <a
dschulze@551 3482 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGUnitTypes">SVGUnitTypes</a>.</div>
dschulze@628 3483
dschulze@628 3484 <dt class="attribute first-child"
dschulze@628 3485 id="SVGClipPathElement__transform"><b>transform</b><span
dschulze@628 3486 class=idl-type-parenthetical> (readonly <a
dschulze@628 3487 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/coords.html#InterfaceSVGAnimatedTransformList">SVGAnimatedTransformList</a>)</span>
dschulze@628 3488
dschulze@628 3489 <dd class=attribute>
dschulze@628 3490 <div> Corresponds to attribute <a class=attr-name
dschulze@628 3491 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/coords.html#TransformAttribute">‘<code
dschulze@628 3492 class=property>transform</code>’</a> on the given element.</div>
dschulze@462 3493 </dl>
dschulze@462 3494 </dl>
dschulze@464 3495
dschulze@473 3496 <h3 id=InterfaceSVGMaskElement><span class=secno>10.2. </span>Interface
dschulze@462 3497 SVGMaskElement</h3>
dschulze@464 3498
dschulze@551 3499 <p>The <a href="#InterfaceSVGMaskElement">SVGMaskElement</a> interface
dschulze@551 3500 corresponds to the <a class=element-name href="#MaskElement">‘<code
dschulze@551 3501 class=property>mask</code>’</a> element.
dschulze@551 3502
dschulze@551 3503 <pre class=idl>interface <b>SVGMaskElement</b> : <a
dschulze@619 3504 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGElement">SVGElement</a> {
dschulze@551 3505 readonly attribute <a
dschulze@551 3506 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedEnumeration">SVGAnimatedEnumeration</a> <a
dschulze@470 3507 href="#SVGMaskElement__maskUnits">maskUnits</a>;
dschulze@551 3508 readonly attribute <a
dschulze@551 3509 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedEnumeration">SVGAnimatedEnumeration</a> <a
dschulze@470 3510 href="#SVGMaskElement__maskContentUnits">maskContentUnits</a>;
dschulze@551 3511 readonly attribute <a
dschulze@551 3512 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedLength">SVGAnimatedLength</a> <a
dschulze@470 3513 href="#SVGMaskElement__x">x</a>;
dschulze@551 3514 readonly attribute <a
dschulze@551 3515 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedLength">SVGAnimatedLength</a> <a
dschulze@470 3516 href="#SVGMaskElement__y">y</a>;
dschulze@551 3517 readonly attribute <a
dschulze@551 3518 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedLength">SVGAnimatedLength</a> <a
dschulze@470 3519 href="#SVGMaskElement__width">width</a>;
dschulze@551 3520 readonly attribute <a
dschulze@551 3521 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedLength">SVGAnimatedLength</a> <a
dschulze@470 3522 href="#SVGMaskElement__height">height</a>;
dschulze@470 3523 };
dschulze@470 3524
dschulze@551 3525 <a
dschulze@551 3526 href="#InterfaceSVGMaskElement">SVGMaskElement</a> implements <a
dschulze@551 3527 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGUnitTypes">SVGUnitTypes</a>;</pre>
dschulze@462 3528
dschulze@462 3529 <dl class=interface>
dschulze@462 3530 <dt class=attributes-header>Attributes:
dschulze@462 3531
dschulze@462 3532 <dd>
dschulze@462 3533 <dl class=attributes>
dschulze@462 3534 <dt class="attribute first-child"
dschulze@464 3535 id="SVGMaskElement__maskUnits"><b>maskUnits</b><span
dschulze@551 3536 class=idl-type-parenthetical> (readonly <a
dschulze@551 3537 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedEnumeration">SVGAnimatedEnumeration</a>)</span>
dschulze@462 3538
dschulze@462 3539 <dd class=attribute>
dschulze@551 3540 <div> Corresponds to attribute <a class=attr-name
dschulze@551 3541 href="#MaskElementMaskUnitsAttribute">‘<code
dschulze@551 3542 class=property>maskUnits</code>’</a> on the given <a
dschulze@551 3543 class=element-name href="#MaskElement">‘<code
dschulze@551 3544 class=property>mask</code>’</a> element. Takes one of the constants
dschulze@551 3545 defined in <a
dschulze@551 3546 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGUnitTypes">SVGUnitTypes</a>.</div>
dschulze@462 3547
dschulze@462 3548 <dt class=attribute
dschulze@464 3549 id="SVGMaskElement__maskContentUnits"><b>maskContentUnits</b><span
dschulze@551 3550 class=idl-type-parenthetical> (readonly <a
dschulze@551 3551 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedEnumeration">SVGAnimatedEnumeration</a>)</span>
dschulze@462 3552
dschulze@462 3553 <dd class=attribute>
dschulze@551 3554 <div> Corresponds to attribute <a class=attr-name
dschulze@551 3555 href="#MaskElementMaskContentUnitsAttribute">‘<code
dschulze@551 3556 class=property>maskContentUnits</code>’</a> on the given <a
dschulze@551 3557 class=element-name href="#MaskElement">‘<code
dschulze@551 3558 class=property>mask</code>’</a> element. Takes one of the constants
dschulze@551 3559 defined in <a
dschulze@551 3560 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGUnitTypes">SVGUnitTypes</a>.</div>
dschulze@462 3561
dschulze@464 3562 <dt class=attribute id="SVGMaskElement__x"><b>x</b><span
dschulze@551 3563 class=idl-type-parenthetical> (readonly <a
dschulze@551 3564 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedLength">SVGAnimatedLength</a>)</span>
dschulze@462 3565
dschulze@462 3566 <dd class=attribute>
dschulze@551 3567 <div> Corresponds to attribute <a class=attr-name
dschulze@551 3568 href="#MaskElementXAttribute">‘<code class=property>x</code>’</a>
dschulze@551 3569 on the given <a class=element-name href="#MaskElement">‘<code
dschulze@551 3570 class=property>mask</code>’</a> element.</div>
dschulze@462 3571
dschulze@464 3572 <dt class=attribute id="SVGMaskElement__y"><b>y</b><span
dschulze@551 3573 class=idl-type-parenthetical> (readonly <a
dschulze@551 3574 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedLength">SVGAnimatedLength</a>)</span>
dschulze@462 3575
dschulze@462 3576 <dd class=attribute>
dschulze@551 3577 <div> Corresponds to attribute <a class=attr-name
dschulze@551 3578 href="#MaskElementYAttribute">‘<code class=property>y</code>’</a>
dschulze@551 3579 on the given <a class=element-name href="#MaskElement">‘<code
dschulze@551 3580 class=property>mask</code>’</a> element.</div>
dschulze@462 3581
dschulze@464 3582 <dt class=attribute id="SVGMaskElement__width"><b>width</b><span
dschulze@551 3583 class=idl-type-parenthetical> (readonly <a
dschulze@551 3584 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedLength">SVGAnimatedLength</a>)</span>
dschulze@462 3585
dschulze@462 3586 <dd class=attribute>
dschulze@551 3587 <div> Corresponds to attribute <a class=attr-name
dschulze@551 3588 href="#MaskElementWidthAttribute">‘<code
dschulze@551 3589 class=property>width</code>’</a> on the given <a class=element-name
dschulze@551 3590 href="#MaskElement">‘<code class=property>mask</code>’</a>
dschulze@551 3591 element.</div>
dschulze@462 3592
dschulze@464 3593 <dt class=attribute id="SVGMaskElement__height"><b>height</b><span
dschulze@551 3594 class=idl-type-parenthetical> (readonly <a
dschulze@551 3595 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#InterfaceSVGAnimatedLength">SVGAnimatedLength</a>)</span>
dschulze@462 3596
dschulze@462 3597 <dd class=attribute>
dschulze@551 3598 <div> Corresponds to attribute <a class=attr-name
dschulze@551 3599 href="#MaskElementHeightAttribute">‘<code
dschulze@551 3600 class=property>height</code>’</a> on the given <a class=element-name
dschulze@551 3601 href="#MaskElement">‘<code class=property>mask</code>’</a>
dschulze@551 3602 element.</div>
dschulze@462 3603 </dl>
dschulze@462 3604 </dl>
dschulze@464 3605
dschulze@741 3606 <h2 id=conformance><span class=secno>11. </span>Conformance</h2>
dschulze@746 3607
dschulze@746 3608 <h3 class=no-ref id=conformance-to-css-background-and-border><span
dschulze@746 3609 class=secno>11.1. </span>Conformance to CSS Background and Borders</h3>
dschulze@746 3610
dschulze@746 3611 <p> Some property and element definitions in this specification require an
dschulze@746 3612 SVG 1.1 implementation <a href="#SVG11"
dschulze@746 3613 rel=biblioentry>[SVG11]<!--{{!SVG11}}--></a>. UAs without support for SVG
dschulze@746 3614 must not implement any of the following properties and elements: ‘<a
dschulze@746 3615 href="#mask-type"><code class=property>mask-type</code></a>’, ‘<a
dschulze@746 3616 href="#clip-rule"><code class=property>clip-rule</code></a>’, <a
dschulze@746 3617 class=element-name href="#ClipPathElement">‘<code
dschulze@746 3618 class=property>clipPath</code>’</a> element, <a class=element-name
dschulze@746 3619 href="#MaskElement">‘<code class=property>mask</code>’</a> element.
dschulze@746 3620 For UAs without support for SVG, the ‘<a href="#mask"><code
dschulze@746 3621 class=property>mask</code></a>’ and ‘<a href="#clip-path"><code
dschulze@746 3622 class=property>clip-path</code></a>’ properties must neither support
dschulze@746 3623 references to <a class=element-name href="#MaskElement">‘<code
dschulze@746 3624 class=property>mask</code>’</a> elements nor to <a class=element-name
dschulze@746 3625 href="#ClipPathElement">‘<code class=property>clipPath</code>’</a>
dschulze@746 3626 elements.</p>
dschulze@741 3627 <!--begin-conformance-->
dschulze@741 3628
dschulze@741 3629 <h3 class=no-ref id=conventions> Document conventions</h3>
dschulze@734 3630
dschulze@734 3631 <p>Conformance requirements are expressed with a combination of descriptive
dschulze@734 3632 assertions and RFC 2119 terminology. The key words “MUST”, “MUST
dschulze@734 3633 NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
dschulze@734 3634 “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the
dschulze@734 3635 normative parts of this document are to be interpreted as described in RFC
dschulze@734 3636 2119. However, for readability, these words do not appear in all uppercase
dschulze@734 3637 letters in this specification.
dschulze@734 3638
dschulze@734 3639 <p>All of the text of this specification is normative except sections
dschulze@734 3640 explicitly marked as non-normative, examples, and notes. <a
dschulze@734 3641 href="#RFC2119" rel=biblioentry>[RFC2119]<!--{{!RFC2119}}--></a>
dschulze@734 3642
dschulze@734 3643 <p>Examples in this specification are introduced with the words “for
dschulze@734 3644 example” or are set apart from the normative text with
dschulze@734 3645 <code>class="example"</code>, like this:
dschulze@734 3646
dschulze@734 3647 <div class=example>
dschulze@734 3648 <p>This is an example of an informative example.
dschulze@734 3649 </div>
dschulze@734 3650
dschulze@734 3651 <p>Informative notes begin with the word “Note” and are set apart from
dschulze@734 3652 the normative text with <code>class="note"</code>, like this:
dschulze@734 3653
dschulze@734 3654 <p class=note>Note, this is an informative note.
dschulze@734 3655
dschulze@741 3656 <h3 class=no-ref id=conformance-classes> Conformance classes</h3>
dschulze@741 3657
dschulze@741 3658 <p>Conformance to this is defined for three conformance classes:
dschulze@734 3659
dschulze@734 3660 <dl>
dschulze@734 3661 <dt><dfn id=style-sheet title="style sheet!!as conformance class">style
dschulze@734 3662 sheet</dfn>
dschulze@734 3663
dschulze@734 3664 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
dschulze@734 3665 style sheet</a>.
dschulze@734 3666
dschulze@734 3667 <dt><dfn id=renderer>renderer</dfn>
dschulze@734 3668
dschulze@734 3669 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
dschulze@734 3670 that interprets the semantics of a style sheet and renders documents that
dschulze@734 3671 use them.
dschulze@734 3672
dschulze@734 3673 <dt><dfn id=authoring-tool>authoring tool</dfn>
dschulze@734 3674
dschulze@734 3675 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
dschulze@734 3676 that writes a style sheet.
dschulze@734 3677 </dl>
dschulze@734 3678
dschulze@741 3679 <p>A style sheet is conformant to this specification if all of its
dschulze@741 3680 statements that use syntax defined in this module are valid according to
dschulze@741 3681 the generic CSS grammar and the individual grammars of each feature
dschulze@741 3682 defined in this module.
dschulze@741 3683
dschulze@741 3684 <p>A renderer is conformant to this specification if, in addition to
dschulze@741 3685 interpreting the style sheet as defined by the appropriate specifications,
dschulze@741 3686 it supports all the features defined by this specification by parsing them
dschulze@741 3687 correctly and rendering the document accordingly. However, the inability
dschulze@741 3688 of a UA to correctly render a document due to limitations of the device
dschulze@741 3689 does not make the UA non-conformant. (For example, a UA is not required to
dschulze@741 3690 render color on a monochrome monitor.)
dschulze@741 3691
dschulze@741 3692 <p>An authoring tool is conformant to this specification if it writes style
dschulze@741 3693 sheets that are syntactically correct according to the generic CSS grammar
dschulze@741 3694 and the individual grammars of each feature in this module, and meet all
dschulze@741 3695 other conformance requirements of style sheets as described in this
dschulze@734 3696 module.
dschulze@734 3697
dschulze@741 3698 <h3 class=no-ref id=partial> Partial implementations</h3>
dschulze@734 3699
dschulze@734 3700 <p>So that authors can exploit the forward-compatible parsing rules to
dschulze@734 3701 assign fallback values, CSS renderers <strong>must</strong> treat as
dschulze@734 3702 invalid (and <a
dschulze@734 3703 href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore as
dschulze@734 3704 appropriate</a>) any at-rules, properties, property values, keywords, and
dschulze@734 3705 other syntactic constructs for which they have no usable level of support.
dschulze@734 3706 In particular, user agents <strong>must not</strong> selectively ignore
dschulze@734 3707 unsupported component values and honor supported values in a single
dschulze@734 3708 multi-value property declaration: if any value is considered invalid (as
dschulze@734 3709 unsupported values must be), CSS requires that the entire declaration be
dschulze@734 3710 ignored.
dschulze@734 3711
dschulze@741 3712 <h3 class=no-ref id=experimental> Experimental implementations</h3>
dschulze@741 3713
dschulze@741 3714 <p>To avoid clashes with future CSS features, the CSS 2.1 specification
dschulze@734 3715 reserves a <a
dschulze@734 3716 href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
dschulze@734 3717 syntax</a> for proprietary and experimental extensions to CSS.
dschulze@734 3718
dschulze@734 3719 <p>Prior to a specification reaching the Candidate Recommendation stage in
dschulze@734 3720 the W3C process, all implementations of a CSS feature are considered
dschulze@734 3721 experimental. The CSS Working Group recommends that implementations use a
dschulze@734 3722 vendor-prefixed syntax for such features, including those in W3C Working
dschulze@734 3723 Drafts. This avoids incompatibilities with future changes in the draft.
dschulze@734 3724
dschulze@741 3725 <h3 class=no-ref id=testing> Non-experimental implementations</h3>
dschulze@734 3726
dschulze@734 3727 <p>Once a specification reaches the Candidate Recommendation stage,
dschulze@734 3728 non-experimental implementations are possible, and implementors should
dschulze@734 3729 release an unprefixed implementation of any CR-level feature they can
dschulze@734 3730 demonstrate to be correctly implemented according to spec.
dschulze@734 3731
dschulze@734 3732 <p>To establish and maintain the interoperability of CSS across
dschulze@734 3733 implementations, the CSS Working Group requests that non-experimental CSS
dschulze@734 3734 renderers submit an implementation report (and, if necessary, the
dschulze@734 3735 testcases used for that implementation report) to the W3C before releasing
dschulze@734 3736 an unprefixed implementation of any CSS features. Testcases submitted to
dschulze@734 3737 W3C are subject to review and correction by the CSS Working Group.
dschulze@734 3738
dschulze@734 3739 <p>Further information on submitting testcases and implementation reports
dschulze@734 3740 can be found from on the CSS Working Group's website at <a
dschulze@734 3741 href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
dschulze@734 3742 Questions should be directed to the <a
dschulze@734 3743 href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
dschulze@741 3744 mailing list. <!--end-conformance-->
dschulze@734 3745
dschulze@273 3746 <h2 class=no-num id=references> References</h2>
dschulze@273 3747
dschulze@273 3748 <h3 class=no-num id=normative-references> Normative references</h3>
dschulze@273 3749 <!--begin-normative-->
dschulze@273 3750 <!-- Sorted by label -->
dschulze@273 3751
dschulze@273 3752 <dl class=bibliography>
dschulze@273 3753 <dt style="display: none"><!-- keeps the doc valid if the DL is empty -->
dschulze@273 3754 <!---->
dschulze@273 3755
dschulze@473 3756 <dt id=CORS>[CORS]
dschulze@473 3757
dschulze@473 3758 <dd>Anne van Kesteren. <a
dschulze@659 3759 href="http://www.w3.org/TR/2013/CR-cors-20130129/"><cite>Cross-Origin
dschulze@659 3760 Resource Sharing.</cite></a> 29 January 2013. W3C Candidate
dschulze@659 3761 Recommendation. (Work in progress.) URL: <a
dschulze@659 3762 href="http://www.w3.org/TR/2013/CR-cors-20130129/">http://www.w3.org/TR/2013/CR-cors-20130129/</a>
dschulze@473 3763 </dd>
dschulze@473 3764 <!---->
dschulze@473 3765
dschulze@273 3766 <dt id=CSS21>[CSS21]
dschulze@273 3767
dschulze@273 3768 <dd>Bert Bos; et al. <a
dschulze@536 3769 href="http://www.w3.org/TR/2011/REC-CSS2-20110607/"><cite>Cascading Style
dschulze@551 3770 Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 June
dschulze@273 3771 2011. W3C Recommendation. URL: <a
dschulze@536 3772 href="http://www.w3.org/TR/2011/REC-CSS2-20110607/">http://www.w3.org/TR/2011/REC-CSS2-20110607/</a>
dschulze@427 3773 </dd>
dschulze@273 3774 <!---->
dschulze@273 3775
dschulze@342 3776 <dt id=CSS3-EXCLUSIONS>[CSS3-EXCLUSIONS]
dschulze@342 3777
dschulze@342 3778 <dd>Vincent Hardy; Rossen Atanassov; Alan Stearns. <a
dschulze@342 3779 href="http://www.w3.org/TR/2012/WD-css3-exclusions-20120503/"><cite>CSS
dschulze@342 3780 Exclusions and Shapes Module Level 3.</cite></a> 3 May 2012. W3C Working
dschulze@342 3781 Draft. (Work in progress.) URL: <a
dschulze@342 3782 href="http://www.w3.org/TR/2012/WD-css3-exclusions-20120503/">http://www.w3.org/TR/2012/WD-css3-exclusions-20120503/</a>
dschulze@427 3783 </dd>
dschulze@342 3784 <!---->
dschulze@342 3785
dschulze@277 3786 <dt id=CSS3-IMAGES>[CSS3-IMAGES]
dschulze@277 3787
dschulze@277 3788 <dd>Elika J. Etemad; Tab Atkins Jr. <a
dschulze@277 3789 href="http://www.w3.org/TR/2012/CR-css3-images-20120417/"><cite>CSS Image
dschulze@277 3790 Values and Replaced Content Module Level 3.</cite></a> 17 April 2012. W3C
dschulze@277 3791 Candidate Recommendation. (Work in progress.) URL: <a
dschulze@277 3792 href="http://www.w3.org/TR/2012/CR-css3-images-20120417/">http://www.w3.org/TR/2012/CR-css3-images-20120417/</a>
dschulze@427 3793 </dd>
dschulze@277 3794 <!---->
dschulze@277 3795
dschulze@659 3796 <dt id=CSS3BG>[CSS3BG]
dschulze@659 3797
dschulze@659 3798 <dd>Bert Bos; Elika J. Etemad; Brad Kemper. <a
dschulze@659 3799 href="http://www.w3.org/TR/2012/CR-css3-background-20120724/"><cite>CSS
dschulze@659 3800 Backgrounds and Borders Module Level 3.</cite></a> 24 July 2012. W3C
dschulze@659 3801 Candidate Recommendation. (Work in progress.) URL: <a
dschulze@659 3802 href="http://www.w3.org/TR/2012/CR-css3-background-20120724/">http://www.w3.org/TR/2012/CR-css3-background-20120724/</a>
dschulze@659 3803 </dd>
dschulze@659 3804 <!---->
dschulze@659 3805
dschulze@731 3806 <dt id=CSS3VAL>[CSS3VAL]
dschulze@731 3807
dschulze@731 3808 <dd>Håkon Wium Lie; Tab Atkins; Elika J. Etemad. <a
dschulze@731 3809 href="http://www.w3.org/TR/2012/CR-css3-values-20120828/"><cite>CSS
dschulze@731 3810 Values and Units Module Level 3.</cite></a> 28 August 2012. W3C Candidate
dschulze@731 3811 Recommendation. (Work in progress.) URL: <a
dschulze@731 3812 href="http://www.w3.org/TR/2012/CR-css3-values-20120828/">http://www.w3.org/TR/2012/CR-css3-values-20120828/</a>
dschulze@731 3813 </dd>
dschulze@731 3814 <!---->
dschulze@731 3815
birtles@291 3816 <dt id=DOM>[DOM]
birtles@291 3817
dschulze@659 3818 <dd>Anne van Kesteren; et al. <a
dschulze@659 3819 href="http://www.w3.org/TR/2012/WD-dom-20121206/"><cite>DOM4.</cite></a>
dschulze@659 3820 6 December 2012. W3C Working Draft. (Work in progress.) URL: <a
dschulze@659 3821 href="http://www.w3.org/TR/2012/WD-dom-20121206/">http://www.w3.org/TR/2012/WD-dom-20121206/</a>
dschulze@427 3822 </dd>
birtles@291 3823 <!---->
birtles@291 3824
dschulze@734 3825 <dt id=RFC2119>[RFC2119]
dschulze@734 3826
dschulze@734 3827 <dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key
dschulze@734 3828 words for use in RFCs to Indicate Requirement Levels.</cite></a> Internet
dschulze@734 3829 RFC 2119. URL: <a
dschulze@734 3830 href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
dschulze@734 3831 </dd>
dschulze@734 3832 <!---->
dschulze@734 3833
birtles@291 3834 <dt id=SELECTORS4>[SELECTORS4]
birtles@291 3835
birtles@291 3836 <dd>Elika J. Etemad. <a
dschulze@402 3837 href="http://www.w3.org/TR/2012/WD-selectors4-20120823/"><cite>Selectors
dschulze@402 3838 Level 4.</cite></a> 23 August 2012. W3C Working Draft. (Work in
birtles@291 3839 progress.) URL: <a
dschulze@402 3840 href="http://www.w3.org/TR/2012/WD-selectors4-20120823/">http://www.w3.org/TR/2012/WD-selectors4-20120823/</a>
dschulze@427 3841 </dd>
birtles@291 3842 <!---->
birtles@291 3843
dschulze@273 3844 <dt id=SVG11>[SVG11]
dschulze@273 3845
dschulze@273 3846 <dd>Erik Dahlström; et al. <a
dschulze@273 3847 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/"><cite>Scalable
dschulze@273 3848 Vector Graphics (SVG) 1.1 (Second Edition).</cite></a> 16 August 2011.
dschulze@273 3849 W3C Recommendation. URL: <a
dschulze@273 3850 href="http://www.w3.org/TR/2011/REC-SVG11-20110816/">http://www.w3.org/TR/2011/REC-SVG11-20110816/</a>
dschulze@427 3851 </dd>
dschulze@273 3852 <!---->
dschulze@273 3853 </dl>
dschulze@273 3854 <!--end-normative-->
dschulze@273 3855
dschulze@470 3856 <dl>
dschulze@470 3857 <dt id=ref-svg2><strong class=normref>[SVG2]</strong>
dschulze@470 3858
dschulze@731 3859 <dd> Cameron McCormack; et al. <a
dschulze@470 3860 href="http://www.w3.org/TR/2012/WD-SVG2-20120828/"><cite>Scalable Vector
dschulze@470 3861 Graphics (SVG) 2</cite>.</a> 28 August 2012. W3C Working Draft. (Work in
dschulze@470 3862 progress.) URL: <a
dschulze@470 3863 href="http://www.w3.org/TR/2012/WD-SVG2-20120828/">http://www.w3.org/TR/2012/WD-SVG2-20120828/</a>
dschulze@470 3864 </dl>
dschulze@470 3865
dschulze@273 3866 <h3 class=no-num id=other-references> Other references</h3>
dschulze@273 3867 <!--begin-informative-->
dschulze@273 3868 <!-- Sorted by label -->
dschulze@273 3869
dschulze@273 3870 <dl class=bibliography>
dschulze@273 3871 <dt style="display: none"><!-- keeps the doc valid if the DL is empty -->
dschulze@273 3872 <!---->
dschulze@273 3873
dschulze@273 3874 <dt id=CSS3-TRANSFORMS>[CSS3-TRANSFORMS]
dschulze@273 3875
dschulze@273 3876 <dd>Simon Fraser; et al. <a
dschulze@536 3877 href="http://www.w3.org/TR/2012/WD-css3-transforms-20120911/"><cite>CSS
dschulze@536 3878 Transforms.</cite></a> 11 September 2012. W3C Working Draft. (Work in
dschulze@273 3879 progress.) URL: <a
dschulze@536 3880 href="http://www.w3.org/TR/2012/WD-css3-transforms-20120911/">http://www.w3.org/TR/2012/WD-css3-transforms-20120911/</a>
dschulze@427 3881 </dd>
dschulze@273 3882 <!---->
dschulze@279 3883
dschulze@463 3884 <dt id=CSSOM-VIEW>[CSSOM-VIEW]
dschulze@463 3885
dschulze@463 3886 <dd>Anne van Kesteren. <a
dschulze@463 3887 href="http://www.w3.org/TR/2011/WD-cssom-view-20110804/"><cite>CSSOM View
dschulze@463 3888 Module.</cite></a> 4 August 2011. W3C Working Draft. (Work in progress.)
dschulze@463 3889 URL: <a
dschulze@463 3890 href="http://www.w3.org/TR/2011/WD-cssom-view-20110804/">http://www.w3.org/TR/2011/WD-cssom-view-20110804/</a>
dschulze@463 3891 </dd>
dschulze@463 3892 <!---->
dschulze@273 3893 </dl>
dschulze@273 3894 <!--end-informative-->
dschulze@273 3895
dschulze@273 3896 <h2 class=no-num id=index> Index</h2>
dschulze@273 3897 <!--begin-index-->
dschulze@273 3898
dschulze@273 3899 <ul class=indexlist>
birtles@447 3900 <li>‘<a href="#alpha"><code class=css>alpha</code></a>’, <a
dschulze@551 3901 href="#alpha" title="section 6.2."><strong>6.2.</strong></a>
dschulze@551 3902
dschulze@734 3903 <li>authoring tool, <a href="#authoring-tool"
dschulze@746 3904 title="section 11.1."><strong>11.1.</strong></a>
dschulze@734 3905
dschulze@551 3906 <li>‘<a href="#auto"><code class=css>auto</code></a>’, <a href="#auto"
dschulze@551 3907 title="section 6.2."><strong>6.2.</strong></a>
dschulze@277 3908
dschulze@274 3909 <li>‘<code class=css>border-box</code>’
dschulze@274 3910 <ul>
dschulze@274 3911 <li>‘<a href="#mask-clip"><code class=property>mask-clip</code></a>’
dschulze@274 3912 value, <a href="#border-box"
dschulze@551 3913 title="section 6.5."><strong>6.5.</strong></a>
dschulze@275 3914
dschulze@276 3915 <li>‘<a href="#mask-origin"><code
dschulze@276 3916 class=property>mask-origin</code></a>’ value, <a href="#border-box0"
dschulze@551 3917 title="section 6.6."><strong>6.6.</strong></a>
dschulze@274 3918 </ul>
dschulze@274 3919
dschulze@451 3920 <li>&lt;bottom&gt;, <a href="#ltbottomgt"
dschulze@536 3921 title="section 8.3."><strong>8.3.</strong></a>
dschulze@451 3922
dschulze@273 3923 <li>bounding client rect, <a href="#bounding-client-rect"
dschulze@536 3924 title="section 4."><strong>4.</strong></a>, <a
dschulze@536 3925 href="#bounding-client-rect0" title="section 8.1.">8.1.</a>, <a
dschulze@552 3926 href="#bounding-client-rect1" title="section 8.1.">8.1.</a>, <a
dschulze@552 3927 href="#bounding-client-rect2" title="section 8.5.">8.5.</a>
dschulze@273 3928
dschulze@274 3929 <li><a href="#ltboxgt"><var>&lt;box&gt;</var></a>, <a href="#ltboxgt"
dschulze@551 3930 title="section 6.5."><strong>6.5.</strong></a>
dschulze@274 3931
birtles@288 3932 <li>&lt;child-selector&gt;, <a href="#ltchild-selectorgt"
dschulze@536 3933 title="section 6.1."><strong>6.1.</strong></a>
dschulze@338 3934
dschulze@536 3935 <li>clip, <a href="#ClipProperty"
dschulze@536 3936 title="section 8.3."><strong>8.3.</strong></a>
dschulze@298 3937
dschulze@615 3938 <li><a href="#ltclip-boxgt"><var>&lt;clip-box&gt;</var></a>, <a
dschulze@615 3939 href="#ltclip-boxgt" title="section 6.5."><strong>6.5.</strong></a>
dschulze@615 3940
dschulze@551 3941 <li>clipPath, <a href="#clippath"
dschulze@551 3942 title="section 8.4."><strong>8.4.</strong></a>
dschulze@551 3943
dschulze@298 3944 <li>clip-path, <a href="#clip-path"
dschulze@536 3945 title="section 8.1."><strong>8.1.</strong></a>
dschulze@298 3946
dschulze@298 3947 <li>clip-rule, <a href="#clip-rule"
dschulze@536 3948 title="section 8.2."><strong>8.2.</strong></a>
dschulze@298 3949
dschulze@338 3950 <li>&lt;clip-source&gt;, <a href="#ltclip-sourcegt"
dschulze@536 3951 title="section 8.1."><strong>8.1.</strong></a>
dschulze@338 3952
dschulze@338 3953 <li>‘<a href="#ltcompound-selectorgt"><code
dschulze@338 3954 class=css>&lt;compound-selector&gt;</code></a>’, <a
dschulze@338 3955 href="#ltcompound-selectorgt"
dschulze@536 3956 title="section 6.1."><strong>6.1.</strong></a>
birtles@288 3957
dschulze@275 3958 <li>‘<a href="#content-box0"><code class=css>content-box</code></a>’,
dschulze@551 3959 <a href="#content-box0" title="section 6.6."><strong>6.6.</strong></a>
dschulze@274 3960 <ul>
dschulze@274 3961 <li>‘<a href="#mask-clip"><code class=property>mask-clip</code></a>’
dschulze@274 3962 value, <a href="#content-box"
dschulze@551 3963 title="section 6.5."><strong>6.5.</strong></a>
dschulze@274 3964 </ul>
dschulze@274 3965
dschulze@298 3966 <li>‘<a href="#evenodd"><code class=css>evenodd</code></a>’, <a
dschulze@536 3967 href="#evenodd" title="section 8.2."><strong>8.2.</strong></a>
dschulze@298 3968
birtles@287 3969 <li>&lt;image&gt;, <a href="#ltimagegt"
dschulze@536 3970 title="section 6.1."><strong>6.1.</strong></a>
dschulze@536 3971
dschulze@536 3972 <li>layers, <a href="#layers" title="section 5.1.">5.1.</a>
dschulze@279 3973
dschulze@451 3974 <li>&lt;left&gt;, <a href="#ltleftgt"
dschulze@536 3975 title="section 8.3."><strong>8.3.</strong></a>
dschulze@451 3976
dschulze@273 3977 <li>local coordinate system, <a href="#local-coordinate-system"
dschulze@536 3978 title="section 4."><strong>4.</strong></a>
dschulze@273 3979
birtles@447 3980 <li>‘<a href="#luminance"><code class=css>luminance</code></a>’, <a
dschulze@551 3981 href="#luminance" title="section 6.2."><strong>6.2.</strong></a>
dschulze@536 3982
dschulze@536 3983 <li>mask, <a href="#MaskProperty"
dschulze@551 3984 title="section 6.8."><strong>6.8.</strong></a>, <a href="#mask"
dschulze@551 3985 title="section 6.10."><strong>6.10.</strong></a>, <a href="#mask0"
dschulze@536 3986 title="section 4."><strong>4.</strong></a>
dschulze@274 3987
dschulze@299 3988 <li>mask-box-image, <a href="#mask-box-image0"
dschulze@536 3989 title="section 7.6."><strong>7.6.</strong></a>
dschulze@299 3990
dschulze@301 3991 <li>mask box image area, <a href="#mask-box-image-area"
dschulze@536 3992 title="section 7.4."><strong>7.4.</strong></a>
dschulze@301 3993
dschulze@299 3994 <li>mask-box-image-outset, <a href="#mask-box-image-outset"
dschulze@536 3995 title="section 7.4."><strong>7.4.</strong></a>
dschulze@299 3996
dschulze@299 3997 <li>mask-box-image-repeat, <a href="#mask-box-image-repeat"
dschulze@536 3998 title="section 7.5."><strong>7.5.</strong></a>
dschulze@299 3999
dschulze@299 4000 <li>mask-box-image-slice, <a href="#mask-box-image-slice"
dschulze@536 4001 title="section 7.2."><strong>7.2.</strong></a>
dschulze@299 4002
dschulze@299 4003 <li>mask-box-image-source, <a href="#mask-box-image-source"
dschulze@536 4004 title="section 7.1."><strong>7.1.</strong></a>
dschulze@299 4005
dschulze@299 4006 <li>mask-box-image-width, <a href="#mask-box-image-width"
dschulze@536 4007 title="section 7.3."><strong>7.3.</strong></a>
dschulze@299 4008
dschulze@274 4009 <li>mask-clip, <a href="#mask-clip"
dschulze@551 4010 title="section 6.5."><strong>6.5.</strong></a>
dschulze@278 4011
dschulze@607 4012 <li>&lt;mask-element&gt;, <a href="#ltmask-elementgt"
dschulze@607 4013 title="section 6.1."><strong>6.1.</strong></a>
dschulze@607 4014
birtles@287 4015 <li>&lt;mask-image&gt;, <a href="#ltmask-imagegt"
dschulze@536 4016 title="section 6.1."><strong>6.1.</strong></a>
dschulze@274 4017
dschulze@274 4018 <li>mask-image, <a href="#mask-image"
dschulze@536 4019 title="section 6.1."><strong>6.1.</strong></a>
dschulze@536 4020
dschulze@536 4021 <li>mask image area, <a href="#mask-image-area" title="section 7.">7.</a>
dschulze@342 4022
birtles@288 4023 <li>&lt;mask-layer&gt;, <a href="#ltmask-layergt"
dschulze@551 4024 title="section 6.8."><strong>6.8.</strong></a>
dschulze@277 4025
dschulze@276 4026 <li>mask-origin, <a href="#mask-origin"
dschulze@551 4027 title="section 6.6."><strong>6.6.</strong></a>
dschulze@276 4028
dschulze@274 4029 <li>mask painting area, <a href="#mask-painting-area"
dschulze@551 4030 title="section 6.5."><strong>6.5.</strong></a>, <a
dschulze@551 4031 href="#mask-painting-area0" title="section 6.3.">6.3.</a>, <a
dschulze@659 4032 href="#mask-painting-area1" title="section 6.4.">6.4.</a>
dschulze@274 4033
dschulze@274 4034 <li>mask-position, <a href="#mask-position"
dschulze@551 4035 title="section 6.4."><strong>6.4.</strong></a>
dschulze@274 4036
dschulze@275 4037 <li>mask positioning area, <a href="#mask-positioning-area"
dschulze@659 4038 title="section 6.6."><strong>6.6.</strong></a>
dschulze@536 4039
dschulze@536 4040 <li>&lt;mask-reference&gt;, <a href="#ltmask-referencegt"
dschulze@536 4041 title="section 6.1."><strong>6.1.</strong></a>
dschulze@275 4042
dschulze@274 4043 <li>mask-repeat, <a href="#mask-repeat"
dschulze@551 4044 title="section 6.3."><strong>6.3.</strong></a>
dschulze@274 4045
dschulze@277 4046 <li><a href="#ltmask-sizegt"><var>&lt;mask-size&gt;</var></a>, <a
dschulze@551 4047 href="#ltmask-sizegt" title="section 6.7."><strong>6.7.</strong></a>
dschulze@277 4048
dschulze@277 4049 <li>mask-size, <a href="#mask-size"
dschulze@551 4050 title="section 6.7."><strong>6.7.</strong></a>
dschulze@277 4051
dschulze@281 4052 <li>mask source, <a href="#mask-source"
dschulze@536 4053 title="section 4."><strong>4.</strong></a>
dschulze@281 4054
dschulze@551 4055 <li>mask-source-type, <a href="#mask-source-type"
dschulze@551 4056 title="section 6.2."><strong>6.2.</strong></a>
dschulze@551 4057
dschulze@277 4058 <li>mask-type, <a href="#mask-type"
dschulze@551 4059 title="section 6.9."><strong>6.9.</strong></a>
dschulze@536 4060
dschulze@536 4061 <li>‘<code class=css>no-clip</code>’
dschulze@474 4062 <ul>
dschulze@474 4063 <li>‘<a href="#mask-clip"><code class=property>mask-clip</code></a>’
dschulze@536 4064 value, <a href="#no-clip"
dschulze@551 4065 title="section 6.5."><strong>6.5.</strong></a>
dschulze@474 4066 </ul>
dschulze@277 4067
dschulze@536 4068 <li>‘<a href="#none"><code class=css>none</code></a>’, <a href="#none"
dschulze@536 4069 title="section 6.1."><strong>6.1.</strong></a>
dschulze@536 4070
dschulze@298 4071 <li>‘<a href="#nonzero"><code class=css>nonzero</code></a>’, <a
dschulze@536 4072 href="#nonzero" title="section 8.2."><strong>8.2.</strong></a>
dschulze@298 4073
dschulze@273 4074 <li>object bounding box units, <a href="#object-bounding-box-units"
dschulze@536 4075 title="section 4."><strong>4.</strong></a>, <a
dschulze@536 4076 href="#object-bounding-box-units0" title="section 8.4.">8.4.</a>
dschulze@273 4077
dschulze@274 4078 <li>‘<code class=css>padding-box</code>’
dschulze@274 4079 <ul>
dschulze@274 4080 <li>‘<a href="#mask-clip"><code class=property>mask-clip</code></a>’
dschulze@274 4081 value, <a href="#padding-box"
dschulze@551 4082 title="section 6.5."><strong>6.5.</strong></a>
dschulze@275 4083
dschulze@276 4084 <li>‘<a href="#mask-origin"><code
dschulze@276 4085 class=property>mask-origin</code></a>’ value, <a href="#padding-box0"
dschulze@551 4086 title="section 6.6."><strong>6.6.</strong></a>
dschulze@274 4087 </ul>
dschulze@274 4088
dschulze@274 4089 <li><a href="#ltpositiongt"><var>&lt;position&gt;</var></a>, <a
dschulze@551 4090 href="#ltpositiongt" title="section 6.4."><strong>6.4.</strong></a>
dschulze@274 4091
dschulze@734 4092 <li>renderer, <a href="#renderer"
dschulze@746 4093 title="section 11.1."><strong>11.1.</strong></a>
dschulze@734 4094
dschulze@274 4095 <li><a href="#ltrepeat-stylegt"><var>&lt;repeat-style&gt;</var></a>, <a
dschulze@551 4096 href="#ltrepeat-stylegt" title="section 6.3."><strong>6.3.</strong></a>
dschulze@274 4097
dschulze@451 4098 <li>&lt;right&gt;, <a href="#ltrightgt"
dschulze@536 4099 title="section 8.3."><strong>8.3.</strong></a>
dschulze@451 4100
dschulze@338 4101 <li>‘<a href="#ltshapegt"><code class=css>&lt;shape&gt;</code></a>’,
dschulze@536 4102 <a href="#ltshapegt" title="section 8.1."><strong>8.1.</strong></a>
dschulze@338 4103
dschulze@551 4104 <li><a href="#ltsource-typegt"><var>&lt;source-type&gt;</var></a>, <a
dschulze@551 4105 href="#ltsource-typegt" title="section 6.2."><strong>6.2.</strong></a>
dschulze@551 4106
dschulze@734 4107 <li>style sheet
dschulze@734 4108 <ul>
dschulze@734 4109 <li>as conformance class, <a href="#style-sheet"
dschulze@746 4110 title="section 11.1."><strong>11.1.</strong></a>
dschulze@734 4111 </ul>
dschulze@734 4112
dschulze@451 4113 <li>&lt;top&gt;, <a href="#lttopgt"
dschulze@536 4114 title="section 8.3."><strong>8.3.</strong></a>
dschulze@451 4115
dschulze@443 4116 <li>‘<a href="#lturlgt"><code class=css>&lt;url&gt;</code></a>’, <a
dschulze@536 4117 href="#lturlgt" title="section 6.1."><strong>6.1.</strong></a>
dschulze@443 4118
dschulze@273 4119 <li>user coordinate system, <a href="#user-coordinate-system"
dschulze@536 4120 title="section 4."><strong>4.</strong></a>
dschulze@273 4121 </ul>
dschulze@273 4122 <!--end-index-->
dschulze@273 4123
dschulze@273 4124 <h2 class=no-num id=property-index> Property index</h2>
dschulze@273 4125 <!--begin-properties-->
dschulze@273 4126
dschulze@273 4127 <table class=proptable>
dschulze@273 4128 <thead>
dschulze@273 4129 <tr>
dschulze@273 4130 <th>Property
dschulze@273 4131
dschulze@273 4132 <th>Values
dschulze@273 4133
dschulze@273 4134 <th>Initial
dschulze@273 4135
dschulze@551 4136 <th>Applies to
dschulze@273 4137
dschulze@273 4138 <th>Inh.
dschulze@273 4139
dschulze@273 4140 <th>Percentages
dschulze@273 4141
dschulze@273 4142 <th>Media
dschulze@273 4143
dschulze@273 4144 <tbody>
dschulze@273 4145 <tr>
dschulze@536 4146 <th><a class=property href="#ClipProperty">clip</a>
dschulze@536 4147
dschulze@536 4148 <td>&lt;shape&gt; | auto
dschulze@536 4149
dschulze@536 4150 <td>see individual properties
dschulze@536 4151
dschulze@536 4152 <td>Absolutely positioned elements. In SVG, it applies to elements which
dschulze@551 4153 establish a new viewport, ‘pattern’ elements and ‘marker’
dschulze@551 4154 elements.
dschulze@536 4155
dschulze@536 4156 <td>no
dschulze@536 4157
dschulze@536 4158 <td>N/A
dschulze@536 4159
dschulze@536 4160 <td>visual
dschulze@536 4161
dschulze@536 4162 <tr>
dschulze@551 4163 <th><a class=property href="#clippath">clipPath</a>
dschulze@551 4164
dschulze@551 4165 <td>
dschulze@551 4166
dschulze@551 4167 <td>
dschulze@551 4168
dschulze@551 4169 <td>
dschulze@551 4170
dschulze@551 4171 <td>
dschulze@551 4172
dschulze@551 4173 <td>
dschulze@551 4174
dschulze@551 4175 <td>
dschulze@551 4176
dschulze@551 4177 <tr>
dschulze@298 4178 <th><a class=property href="#clip-path">clip-path</a>
dschulze@298 4179
dschulze@338 4180 <td>&lt;shape&gt; | &lt;clip-source&gt; | none
dschulze@298 4181
dschulze@298 4182 <td>none
dschulze@298 4183
dschulze@298 4184 <td>All elements. SVG container elements, graphics elements and
dschulze@298 4185 ‘clipPath’
dschulze@298 4186
dschulze@298 4187 <td>no
dschulze@298 4188
dschulze@338 4189 <td>as specified
dschulze@298 4190
dschulze@298 4191 <td>visual
dschulze@298 4192
dschulze@298 4193 <tr>
dschulze@536 4194 <th><a class=property href="#clip-rule">clip-rule</a>
dschulze@536 4195
dschulze@536 4196 <td>nonzero | evenodd
dschulze@536 4197
dschulze@536 4198 <td>nonzero
dschulze@536 4199
dschulze@536 4200 <td>graphics elements within a ‘clipPath’ element
dschulze@536 4201
dschulze@536 4202 <td>yes
dschulze@536 4203
dschulze@536 4204 <td>N/A
dschulze@536 4205
dschulze@536 4206 <td>visual
dschulze@298 4207
dschulze@298 4208 <tr>
dschulze@551 4209 <th><a class=property href="#mask">mask</a>
dschulze@551 4210
dschulze@551 4211 <td>
dschulze@551 4212
dschulze@551 4213 <td>
dschulze@551 4214
dschulze@551 4215 <td>
dschulze@551 4216
dschulze@551 4217 <td>
dschulze@551 4218
dschulze@551 4219 <td>
dschulze@551 4220
dschulze@551 4221 <td>
dschulze@551 4222
dschulze@551 4223 <tr>
dschulze@536 4224 <th><a class=property href="#MaskProperty">mask</a>
dschulze@536 4225
dschulze@536 4226 <td>&lt;mask-layer&gt;#
dschulze@451 4227
dschulze@451 4228 <td>see individual properties
dschulze@451 4229
dschulze@536 4230 <td>All elements. In SVG, it applies to container elements and graphics
dschulze@536 4231 elements
dschulze@451 4232
dschulze@451 4233 <td>no
dschulze@451 4234
dschulze@536 4235 <td>see individual properties
dschulze@299 4236
dschulze@299 4237 <td>visual
dschulze@299 4238
dschulze@299 4239 <tr>
dschulze@299 4240 <th><a class=property href="#mask-box-image0">mask-box-image</a>
dschulze@299 4241
dschulze@299 4242 <td>&lt;‘mask-box-image-source’&gt; ||
dschulze@299 4243 &lt;‘mask-box-image-slice’&gt; [ /
dschulze@299 4244 &lt;‘mask-box-image-width’&gt; | /
dschulze@299 4245 &lt;‘mask-box-image-width’&gt;? /
dschulze@299 4246 &lt;‘mask-box-image-outset’&gt; ]? ||
dschulze@299 4247 &lt;‘mask-box-image-repeat’&gt;
dschulze@299 4248
dschulze@299 4249 <td>See individual properties
dschulze@299 4250
dschulze@299 4251 <td>See individual properties
dschulze@299 4252
dschulze@299 4253 <td>no
dschulze@299 4254
dschulze@299 4255 <td>N/A
dschulze@299 4256
dschulze@299 4257 <td>visual
dschulze@299 4258
dschulze@299 4259 <tr>
dschulze@299 4260 <th><a class=property
dschulze@536 4261 href="#mask-box-image-outset">mask-box-image-outset</a>
dschulze@536 4262
dschulze@536 4263 <td>[ &lt;length&gt; | &lt;number&gt; ]{1,4}
dschulze@536 4264
dschulze@536 4265 <td>0
dschulze@299 4266
dschulze@299 4267 <td>All elements. In SVG, it applies to container elements and graphics
dschulze@299 4268 elements.
dschulze@299 4269
dschulze@299 4270 <td>no
dschulze@299 4271
dschulze@536 4272 <td>N/A
dschulze@536 4273
dschulze@536 4274 <td>visual
dschulze@536 4275
dschulze@536 4276 <tr>
dschulze@536 4277 <th><a class=property
dschulze@536 4278 href="#mask-box-image-repeat">mask-box-image-repeat</a>
dschulze@536 4279
dschulze@536 4280 <td>[ stretch | repeat | round | space ]{1,2}
dschulze@536 4281
dschulze@536 4282 <td>stretch
dschulze@536 4283
dschulze@536 4284 <td>All elements. In SVG, it applies to container elements and graphics
dschulze@536 4285 elements.
dschulze@536 4286
dschulze@536 4287 <td>no
dschulze@536 4288
dschulze@536 4289 <td>N/A
dschulze@536 4290
dschulze@536 4291 <td>visual
dschulze@536 4292
dschulze@536 4293 <tr>
dschulze@536 4294 <th><a class=property
dschulze@536 4295 href="#mask-box-image-slice">mask-box-image-slice</a>
dschulze@536 4296
dschulze@536 4297 <td>[&lt;number&gt; | &lt;percentage&gt;]{1,4} &amp;&amp; fill?
dschulze@536 4298
dschulze@536 4299 <td>0 fill
dschulze@536 4300
dschulze@536 4301 <td>All elements. In SVG, it applies to container elements and graphics
dschulze@536 4302 elements.
dschulze@536 4303
dschulze@536 4304 <td>no
dschulze@536 4305
dschulze@536 4306 <td>refer to size of the mask image
dschulze@536 4307
dschulze@536 4308 <td>visual
dschulze@536 4309
dschulze@536 4310 <tr>
dschulze@536 4311 <th><a class=property
dschulze@536 4312 href="#mask-box-image-source">mask-box-image-source</a>
dschulze@536 4313
dschulze@536 4314 <td>&lt;mask-image&gt;
dschulze@536 4315
dschulze@536 4316 <td>none
dschulze@536 4317
dschulze@536 4318 <td>All elements. In SVG, it applies to container elements and graphics
dschulze@536 4319 elements.
dschulze@536 4320
dschulze@536 4321 <td>no
dschulze@536 4322
dschulze@536 4323 <td>N/A
dschulze@536 4324
dschulze@536 4325 <td>visual
dschulze@536 4326
dschulze@536 4327 <tr>
dschulze@536 4328 <th><a class=property
dschulze@536 4329 href="#mask-box-image-width">mask-box-image-width</a>
dschulze@536 4330
dschulze@536 4331 <td>[ &lt;length&gt; | &lt;percentage&gt; | &lt;number&gt; | auto ]{1,4}
dschulze@536 4332
dschulze@536 4333 <td>auto
dschulze@536 4334
dschulze@536 4335 <td>All elements. In SVG, it applies to container elements and graphics
dschulze@536 4336 elements.
dschulze@536 4337
dschulze@536 4338 <td>no
dschulze@536 4339
dschulze@451 4340 <td>relative to width/height of the mask box image area
dschulze@299 4341
dschulze@299 4342 <td>visual
dschulze@299 4343
dschulze@299 4344 <tr>
dschulze@274 4345 <th><a class=property href="#mask-clip">mask-clip</a>
dschulze@274 4346
dschulze@615 4347 <td>&lt;clip-box&gt;#
dschulze@274 4348
dschulze@274 4349 <td>border-box
dschulze@274 4350
dschulze@274 4351 <td>All elements. In SVG, it applies to container elements and graphics
dschulze@274 4352 elements
dschulze@274 4353
dschulze@274 4354 <td>no
dschulze@274 4355
dschulze@274 4356 <td>N/A
dschulze@274 4357
dschulze@274 4358 <td>visual
dschulze@274 4359
dschulze@274 4360 <tr>
dschulze@274 4361 <th><a class=property href="#mask-image">mask-image</a>
dschulze@274 4362
dschulze@607 4363 <td>&lt;mask-reference&gt;
dschulze@274 4364
dschulze@274 4365 <td>none
dschulze@274 4366
dschulze@274 4367 <td>All elements. In SVG, it applies to container elements and graphics
dschulze@274 4368 elements
dschulze@274 4369
dschulze@274 4370 <td>no
dschulze@274 4371
dschulze@274 4372 <td>N/A
dschulze@274 4373
dschulze@274 4374 <td>visual
dschulze@274 4375
dschulze@274 4376 <tr>
dschulze@276 4377 <th><a class=property href="#mask-origin">mask-origin</a>
dschulze@276 4378
dschulze@280 4379 <td>&lt;box&gt;#
dschulze@276 4380
dschulze@276 4381 <td>padding-box
dschulze@276 4382
dschulze@277 4383 <td>All elements. In SVG, it applies to container elements and graphics
dschulze@277 4384 elements
dschulze@276 4385
dschulze@276 4386 <td>no
dschulze@276 4387
dschulze@276 4388 <td>N/A
dschulze@276 4389
dschulze@276 4390 <td>visual
dschulze@276 4391
dschulze@276 4392 <tr>
dschulze@274 4393 <th><a class=property href="#mask-position">mask-position</a>
dschulze@274 4394
dschulze@280 4395 <td>&lt;position&gt;#
dschulze@274 4396
dschulze@274 4397 <td>0% 0%
dschulze@274 4398
dschulze@274 4399 <td>All elements. In SVG, it applies to container elements and graphics
dschulze@274 4400 elements
dschulze@274 4401
dschulze@274 4402 <td>no
dschulze@274 4403
dschulze@274 4404 <td>refer to size of mask painting area minus size of mask image; see
dschulze@274 4405 text
dschulze@274 4406
dschulze@274 4407 <td>visual
dschulze@274 4408
dschulze@274 4409 <tr>
dschulze@274 4410 <th><a class=property href="#mask-repeat">mask-repeat</a>
dschulze@274 4411
dschulze@280 4412 <td>&lt;repeat-style&gt;#
dschulze@274 4413
dschulze@274 4414 <td>repeat
dschulze@274 4415
dschulze@274 4416 <td>All elements. In SVG, it applies to container elements and graphics
dschulze@274 4417 elements
dschulze@274 4418
dschulze@274 4419 <td>no
dschulze@274 4420
dschulze@274 4421 <td>N/A
dschulze@274 4422
dschulze@274 4423 <td>visual
dschulze@274 4424
dschulze@274 4425 <tr>
dschulze@277 4426 <th><a class=property href="#mask-size">mask-size</a>
dschulze@277 4427
dschulze@280 4428 <td>&lt;mask-size&gt;#
dschulze@277 4429
dschulze@277 4430 <td>auto
dschulze@273 4431
dschulze@273 4432 <td>All elements. In SVG, it applies to container elements and graphics
dschulze@273 4433 elements
dschulze@273 4434
dschulze@273 4435 <td>no
dschulze@273 4436
dschulze@277 4437 <td>see text
dschulze@273 4438
dschulze@273 4439 <td>visual
dschulze@273 4440
dschulze@273 4441 <tr>
dschulze@551 4442 <th><a class=property href="#mask-source-type">mask-source-type</a>
dschulze@551 4443
dschulze@551 4444 <td>&lt;source-type&gt;#
dschulze@551 4445
dschulze@551 4446 <td>auto
dschulze@551 4447
dschulze@551 4448 <td>All elements. In SVG, it applies to container elements and graphics
dschulze@551 4449 elements
dschulze@551 4450
dschulze@551 4451 <td>no
dschulze@551 4452
dschulze@551 4453 <td>N/A
dschulze@551 4454
dschulze@551 4455 <td>visual
dschulze@551 4456
dschulze@551 4457 <tr>
dschulze@277 4458 <th><a class=property href="#mask-type">mask-type</a>
dschulze@277 4459
dschulze@552 4460 <td>luminance | alpha
dschulze@277 4461
dschulze@432 4462 <td>luminance
dschulze@432 4463
dschulze@551 4464 <td>‘mask’ elements
dschulze@277 4465
dschulze@277 4466 <td>no
dschulze@277 4467
dschulze@277 4468 <td>N/A
dschulze@277 4469
dschulze@277 4470 <td>visual
dschulze@273 4471 </table>
dschulze@273 4472 <!--end-properties-->
dschulze@273 4473 </html>
dschulze@470 4474 <!-- Keep this comment at the end of the file
dschulze@470 4475 Local variables:
dschulze@470 4476 mode: sgml
dschulze@470 4477 sgml-declaration:"~/SGML/HTML4.decl"
dschulze@470 4478 sgml-default-doctype-name:"html"
dschulze@470 4479 sgml-minimize-attributes:t
dschulze@470 4480 sgml-nofill-elements:("pre" "style" "br")
dschulze@470 4481 sgml-live-element-indicator:t
dschulze@470 4482 sgml-omittag:nil
dschulze@470 4483 sgml-shorttag:nil
dschulze@470 4484 sgml-namecase-general:t
dschulze@470 4485 sgml-general-insert-case:lower
dschulze@470 4486 sgml-always-quote-attributes:t
dschulze@470 4487 sgml-indent-step:nil
dschulze@470 4488 sgml-indent-data:t
dschulze@470 4489 sgml-parent-document:nil
dschulze@470 4490 sgml-exposed-tags:nil
dschulze@470 4491 sgml-local-catalogs:nil
dschulze@470 4492 sgml-local-ecat-files:nil
dschulze@470 4493 End:
dschulze@273 4494 -->

mercurial