Skip to content

Commit b79a139

Browse files
committed
Drop the IDENT arg from element(), link to CSSElementMap.
1 parent 12877a6 commit b79a139

2 files changed

Lines changed: 17 additions & 18 deletions

File tree

css3-images/Overview.html

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -606,21 +606,22 @@ <h3 id=element-reference><span class=secno>3.3. </span> Using Elements as
606606
class=css>element()</code>&rsquo; is:
607607

608608
<pre class=prod><dfn
609-
id=ltelement-reference>&lt;element-reference></dfn> = element( [&lt;id-selector> | &lt;identifier> ] )</pre>
609+
id=ltelement-reference>&lt;element-reference></dfn> = element( &lt;id-selector> )</pre>
610610

611611
<p>where &lt;id-selector> is an ID selector <a href="#SELECT"
612-
rel=biblioentry>[SELECT]<!--{{!SELECT}}--></a>, and &lt;identifier> is an
613-
identifer <a href="#CSS3VAL"
614-
rel=biblioentry>[CSS3VAL]<!--{{!CSS3VAL}}--></a>.
612+
rel=biblioentry>[SELECT]<!--{{!SELECT}}--></a>.
615613

616614
<p>If the argument to the &lsquo;<code class=css>element()</code>&rsquo;
617615
function is an ID selector, the function references the element matched by
618-
the selector. If it's an identifier, the function references the element
619-
whose <dfn id=css-element-reference-identifier>CSS element reference
620-
identifier</dfn> is the given identifier. (CSS does not define how an
621-
element acquires a <a href="#css-element-reference-identifier"><i>CSS
622-
element reference identifier</i></a>; that is determined by the host
623-
language.)
616+
the selector.
617+
618+
<p>HTML defines an additional way for an element to match this ID selector,
619+
via the <a
620+
href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-csselementmap"><code>CSSElementMap</code></a>.
621+
If an element matching the ID selector is not found in the document, the
622+
ID is then looked up in the <code>CSSElementMap</code>. Other host
623+
languages may define additional ways for elements to match the argument in
624+
&lsquo;<code class=css>element()</code>&rsquo;.
624625

625626
<div class=example>
626627
<p>The &lsquo;<code class=css>element()</code>&rsquo; function can be put
@@ -2717,10 +2718,6 @@ <h2 class=no-num id=index>Index</h2>
27172718
<li>concrete object size, <a href="#concrete-object-size"
27182719
title="concrete object size"><strong>5.1.</strong></a>
27192720

2720-
<li>CSS element reference identifier, <a
2721-
href="#css-element-reference-identifier"
2722-
title="CSS element reference identifier"><strong>3.3.</strong></a>
2723-
27242721
<li>default object size, <a href="#default-object-size"
27252722
title="default object size"><strong>5.1.</strong></a>
27262723

css3-images/Overview.src.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,13 @@ <h3 id='element-reference'>
287287

288288
<p>The ''element()'' function allows an author to use an element in the document as an image. As the referenced element changes appearance, the image changes as well. This can be used, for example, to create live previews of the next/previous slide in a slideshow, or to reference a canvas element for a fancy generated gradient or even an animated background. The syntax for ''element()'' is:</p>
289289

290-
<pre class=prod><dfn>&lt;element-reference></dfn> = element( [&lt;id-selector> | &lt;identifier> ] )</pre>
290+
<pre class=prod><dfn>&lt;element-reference></dfn> = element( &lt;id-selector> )</pre>
291291

292-
<p>where &lt;id-selector> is an ID selector [[!SELECT]], and &lt;identifier> is an identifer [[!CSS3VAL]].</p>
292+
<p>where &lt;id-selector> is an ID selector [[!SELECT]].</p>
293293

294-
<p>If the argument to the ''element()'' function is an ID selector, the function references the element matched by the selector. If it's an identifier, the function references the element whose <dfn>CSS element reference identifier</dfn> is the given identifier. (CSS does not define how an element acquires a <i>CSS element reference identifier</i>; that is determined by the host language.)</p>
294+
<p>If the argument to the ''element()'' function is an ID selector, the function references the element matched by the selector.</p>
295+
296+
<p>HTML defines an additional way for an element to match this ID selector, via the <a href='http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-csselementmap'><code>CSSElementMap</code></a>. If an element matching the ID selector is not found in the document, the ID is then looked up in the <code>CSSElementMap</code>. Other host languages may define additional ways for elements to match the argument in ''element()''.</p>
295297

296298
<div class='example'>
297299
<p>The ''element()'' function can be put to many uses. For example, it can be used to show a preview of the previous or next slide in a slideshow:</p>
@@ -455,7 +457,7 @@ <h4 id='paint-sources'>
455457
<dt>userSpaceOnUse</dt>
456458
<dd>The coordinate system has its origin at the top left corner of the painting area. Units in the coordinate space are sized equivalently to the CSS ''px'' unit.</dd>
457459
</dl>
458-
460+
459461
<!-- ====================================================================== -->
460462

461463
<h4 class="no-num no-toc" id='element-cycles'>

0 commit comments

Comments
 (0)