- From: H?kon Wium Lie via cvs-syncmail <cvsmail@w3.org>
- Date: Sun, 05 Feb 2012 23:39:56 +0000
- To: public-css-commits@w3.org
Update of /sources/public/csswg/css3-gcpm
In directory hutz:/tmp/cvs-serv9670
Modified Files:
Overview.src.html
Log Message:
revision based on comments from tab/fantasai
Index: Overview.src.html
===================================================================
RCS file: /sources/public/csswg/css3-gcpm/Overview.src.html,v
retrieving revision 1.204
retrieving revision 1.205
diff -u -d -r1.204 -r1.205
--- Overview.src.html 11 Jan 2012 00:34:23 -0000 1.204
+++ Overview.src.html 5 Feb 2012 23:39:54 -0000 1.205
@@ -125,7 +125,7 @@
<p>Consider this code:
<pre>
-h1 { string-set: title content() }
+h1 { string-set: title contents }
</pre>
<p>Whenever an <code>h1</code> element is encountered,
@@ -187,31 +187,29 @@
<dt><counter>
<dd>the counter() or counters() function, as per <a href="http://www.w3.org/TR/CSS21/syndata.html#counter">CSS 2.1 section 4.3.5</a>
-<dt><content>
+<dt>contents
-<dd>the ''content()'' function returns the content of elements and pseudo-elements. The functional notation accepts an optional argument:
-
-<dl>
+<dd>The textual content of the element, including the content of its ::before and ::after pseudo-element. The content of the element's descendants, including their respective ::before and ::after pseudo-elements, are included in the returned content.
-<dt>''content()''
+<dt>content-element
-<dd>Without any arguments, the function returns the textual content of the element, not including the content of its ::before and ::after pseudo-element. The content of the element's descendants, including their respective ::before and ::after pseudo-elements, are included in the returned content.
+<dd>The textual content of the element, not including the content of its ::before and ::after pseudo-element. The content of the element's descendants, including their respective ::before and ::after pseudo-elements, are included in the returned content.
-<dt>''content(before)''
+<dt>content-before
-<dd>The function returns the textual content of the ::before pseudo-element the content of the element.
+<dd>The textual content of the ::before pseudo-element the content of the element.
-<dt>''content(after)''
+<dt>content-after
-<dd>The function returns the textual content of the ::after pseudo-element the content of the element.
+<dd>The textual content of the ::after pseudo-element the content of the element.
-<dt>''content(first-letter)''
+<dt>content-first-letter
-<dd>The function returns the first letter of the content of the element. The definition of a letter is the same as for :first-letter pseudo-elements.
+<dd>The first letter of the content of the element. The definition of a letter is the same as for :first-letter pseudo-elements.
-<p class="note">The expected use for ''content(first-letter)'' is to create one-letter headers, e.g., in dictionaries.</p>
+<p class="note">The expected use for ''content-first-letter'' is to create one-letter headers, e.g., in dictionaries.</p>
-<dt>''env()''
+<dt>env()
<dd>This function returns data from the local environment of the user at
the time of formatting. The function accepts one of these keywords:
@@ -264,7 +262,7 @@
<div class="example">
<pre>
h2 {
- string-set: header "Chapter " counter(header) ": " content();
+ string-set: header "Chapter " counter(header) ": " contents;
counter-increment: header;
}
</pre>
@@ -281,14 +279,14 @@
<pre>
h2:before { content: "Chapter " counter(header) }
h2 {
- string-set: header content(before) content();
+ string-set: header content-before content-element;
counter-increment: header }
</pre>
</div>
<div class="example">
<pre>
-dt { string-set: index content(first-letter) }
+dt { string-set: index content-first-letter }
</pre>
</div>
@@ -298,7 +296,7 @@
<pre>
title {
display: none;
- string-set: header content();
+ string-set: header contents;
}
</div>
@@ -314,8 +312,8 @@
@page { @top-center { content: string(header) }}
@page { @right-middle { content: string(index) }}
@page { @top-left { content: string(entry) }}
-h1 { string-set: header "Chapter " counter(chapter) content() }
-dt { string-set: index content(first-letter), entry content() }
+h1 { string-set: header "Chapter " counter(chapter) contents }
+dt { string-set: index content-first-letter, entry contents }
</pre>
</div>
@@ -339,7 +337,7 @@
@page { @top-left { content: string(term, first) }}
@page { @top-right { content: string(term, last) }}
@page { @top-center { content: string(index, first) }}
-dt { string-set: index content(first-letter), term content() }
+dt { string-set: index content-first-letter, term contents }
</pre>
</div>
@@ -348,7 +346,7 @@
<p>In this example, the header in the top center will be blank on pages where 'h1' elements appear. On other pages, the string of the previous 'h1' element will be shown.
<pre>
@page { @top-center { content: string(chapter, first-except) }}
-h1 { string-set: chapter content() }
+h1 { string-set: chapter contents }
</pre>
</div>
@@ -724,29 +722,9 @@
is copied; not style, structure, or replaced content.
''target-text()'' has one required argument: the url of the link. An
optional second argument specifies exactly which content is fetched.
-There are four possible values:
-
-<dl>
-<dt>''content()''
-
-<dd>refers to the textual content of
- the element, not including the content of its ::before and ::after
- pseudo-element. The content of the element's descendants, including their
- respective ::before and ::after pseudo-elements, are included in the returned content.
-
-<dt>''content(before)''
-
-<dd>refers to the content of the element's ::before pseudo-element. This is the default value.
-
-<dt>''content(after)''
-
-<dd>refers to the content of the element's ::after pseudo-element
-
-<dt>''content(first-letter)''
-
-<dd>refers to the first letter of the textual content of the element, not including the content of its ::before and ::after pseudo-element.
-
-</dl>
+There are five possible values: ''contents'', ''content-element'',
+''content-before'', ''content-after'', ''content-first-letter''; these
+keywords are defined above.
<div class="example">
@@ -769,7 +747,7 @@
<pre>
h2 { counter-increment: chapter }
a { content: "Chapter " target-counter(attr(href, url), chapter)
- ' ("' target-text(attr(href), content()) '") on page '
+ ' ("' target-text(attr(href), content-element) '") on page '
target-counter(attr(href, url), page);
</pre>
</div>
@@ -843,6 +821,8 @@
<p id=words><span class="call">[3]</span> Most often.
</pre>
+<p class=issue>define ''target-pull''
+
<p>When shown in a legacy browser, the content of the element will be
shown as a clickable link to an endnote. When printed according to
this specification, there will be a footnote:
@@ -2155,10 +2135,10 @@
<td><dfn>bookmark-label</dfn>
<tr>
<td><em>Value:</em>
- <td>content() | <string>
+ <td>none | contents | content-before | content-element | content-after | <string>
<tr>
<td><em>Initial:</em>
- <td>content()
+ <td>none
<tr>
<td><em>Applies to:</em>
<td>all elements
@@ -2182,8 +2162,8 @@
<div class="example">
<pre>
a { bookmark-label: attr(title, string) }
-h1 { bookmark-label: content() }
-h2 { bookmark-label: content(before) }
+h1 { bookmark-label: contents }
+h2 { bookmark-label: content-before }
#frog { bookmark-label: "The green frog" }
</pre>
</div>
@@ -2429,7 +2409,7 @@
<dl>
-<dt>link-rel()
+<dt>go()
<dd>the function takes one argument, which refers to the <tt>rel</tt> attribute of the <tt>link</tt> element
@@ -2439,57 +2419,52 @@
<link rel=previous href=g3.html>
<link rel=next href=g1.html>
...
-@-o-navigation {
- nav-up: link-rel(index);
- nav-left: link-rel(previous);
- nav-right: link-rel(next);
+@navigation {
+ nav-up: go(index);
+ nav-left: go(previous);
+ nav-right: go(next);
}
</pre>
</div>
<p class=issue>This functionality relies on semantics in HTML and CSS. Other languages may have other other ways to describe such semantics. One possible solution for other languages is "link[rel=index] { nav-up: attr(href) }"
-<p class=issue>The "link-rel" name is a bit academic, perhaps the "go()" name can be used instead?
-
-<dt>go()
+<dt>''back''
-<dd>The function takes one argument: <tt>back</tt>, which takes the user one step back in history.
+<dd>The keyword takes the user one step back in the history of browsed pages.
<div class=example>
<pre>
@navigation {
- nav-left: go(back);
+ nav-left: back;
}
</pre>
</div>
-
-<dt>
-
-<dt>url-doc()
+<dt>url()
<dd>The funcation takes one argument: a URL. Relative URLs are
-relative to the document, not to the style sheet.
+relative to the style sheet.
<div class=example>
<pre>
@navigation {
- nav-up: url-doc(..);
- nav-down: url-doc(a1.html);
+ nav-up: url(..);
+ nav-down: url(a1.html);
}
</pre>
</div>
-<dt>url()
+<dt>url-doc()
-<dd>The funcation takes one argument: a URL. Relative URLs are
-relative to the style sheet.
+<dd>The function is identical to url(), except that relative URLs are
+relative to the document, not to the style sheet.
<div class=example>
<pre>
@navigation {
- nav-up: url(..);
- nav-down: url(a1.html);
+ nav-up: url-doc(..);
+ nav-down: url-doc(a1.html);
}
</pre>
</div>
@@ -2498,6 +2473,8 @@
+
+
<div class=example>
<p>Combined with the <a href="http://www.w3.org/TR/2011/WD-css3-conditional-20110901/#at-document">@document-rule</a>, navigation maps can be described:
@@ -3489,6 +3466,7 @@
h6 { bookmark-level: 6 }
</pre>
+<p class=issue>Add grammar for functions defined in this spec.
<h2 class=no-num id=acknowledgments>Acknowledgments</h2>
Received on Sunday, 5 February 2012 23:39:58 UTC