- From: Tab Atkins Jr.. via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 01 Nov 2011 21:29:26 +0000
- To: public-css-commits@w3.org
Update of /sources/public/csswg/css3-lists In directory hutz:/tmp/cvs-serv18220 Modified Files: Overview.html Overview.src.html Log Message: Added the symbols() function from GCPM for anonymous counter styles. Index: Overview.html =================================================================== RCS file: /sources/public/csswg/css3-lists/Overview.html,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- Overview.html 4 Aug 2011 21:15:31 -0000 1.79 +++ Overview.html 1 Nov 2011 21:29:24 -0000 1.80 @@ -4,11 +4,10 @@ <head> <title>CSS Lists and Counters Module Level 3</title> <meta content="text/html; charset=utf-8" http-equiv=Content-Type> - <link href="http://dev.w3.org/csswg/default.css" rel=stylesheet + <link href="http://dev.w3.org/csswg/css-module/default.css" rel=stylesheet type="text/css"> <style> - p { text-indent: 0 !important; margin: .5em 0; } code.inline { white-space: nowrap; } .alphabetic-example { font-family: monospace; font-size: 90%; margin: 1em 0 1em 2em; } [...2180 lines suppressed...] <li>upper-serbo-croatian, <a href="#upper-serbo-croatian" - title=upper-serbo-croatian><strong>9.3.</strong></a> + title=upper-serbo-croatian><strong>10.3.</strong></a> <li>upper-ukrainian, <a href="#upper-ukrainian" - title=upper-ukrainian><strong>9.3.</strong></a> + title=upper-ukrainian><strong>10.3.</strong></a> <li>upper-ukrainian-full, <a href="#upper-ukrainian-full" - title=upper-ukrainian-full><strong>9.3.</strong></a> + title=upper-ukrainian-full><strong>10.3.</strong></a> - <li>wolaita, <a href="#wolaita" title=wolaita><strong>9.3.</strong></a> + <li>wolaita, <a href="#wolaita" title=wolaita><strong>10.3.</strong></a> - <li>yemsa, <a href="#yemsa" title=yemsa><strong>9.3.</strong></a> + <li>yemsa, <a href="#yemsa" title=yemsa><strong>10.3.</strong></a> </ul> <!--end-index--> Index: Overview.src.html =================================================================== RCS file: /sources/public/csswg/css3-lists/Overview.src.html,v retrieving revision 1.126 retrieving revision 1.127 diff -u -d -r1.126 -r1.127 --- Overview.src.html 23 Jul 2011 01:17:59 -0000 1.126 +++ Overview.src.html 1 Nov 2011 21:29:24 -0000 1.127 @@ -2,9 +2,8 @@ <html><head> <title>CSS Lists and Counters Module Level 3</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" > - <link rel="stylesheet" type="text/css" href="http://dev.w3.org/csswg/default.css"> + <link rel="stylesheet" type="text/css" href="http://dev.w3.org/csswg/css-module/default.css"> <style> - p { text-indent: 0 !important; margin: .5em 0; } code.inline { white-space: nowrap; } .alphabetic-example { font-family: monospace; font-size: 90%; margin: 1em 0 1em 2em; } .alphabetic-example > span { display: inline-block; width: 50px;} @@ -227,7 +226,7 @@ <p>The 'list-style-type' property specifies an image that will be used as the list marker. If the value resolves to a valid image, the image must be used as the default contents of the <code class=css>::marker</code> pseudo-element.</p> - <p>If the value ''none'' is provided, or the <b><image></b> doesn't resolve to a valid image, then the default contents are given by 'list-style-type' instead.</p> + <p>If the value ''none'' is provided, or the <i><image></i> doesn't resolve to a valid image, then the default contents are given by 'list-style-type' instead.</p> <div class="example"> <p>The following example sets the marker at the beginning of each list item to @@ -241,7 +240,7 @@ <td><dfn>list-style-type</dfn> <tr> <th>Value: - <td><b><string></b> | <b><counter-style></b> | none + <td><string> | <symbols-function> | <counter-style> | none <tr> <th>Initial: <td>disc @@ -265,10 +264,13 @@ <p>When the 'list-style-image' property is ''none'' or not a valid image, the 'list-style-type' property must instead used to construct the default contents of a list item's marker.</p> <dl> - <dt><dfn><string></dfn></dt> + <dt><string></dt> <dd>The <code class=css>::marker</code> pseudo-element must use the provided string as its default contents.</dd> - <dt><dfn><counter-style></dfn></dt> + <dt><symbols-function></dt> + <dd>The <code class=css>::marker</code> pseudo-element's default contents must be the value of the ''list-item'' counter, formatted according to the anonymous counter style defined by the provided ''symbols()'' function.</dd> + + <dt><counter-style></dt> <dd> <p>The <code class=css>::marker</code> pseudo-element's default contents must be the value of the ''list-item'' counter, formatted according to the given counter style. @@ -1524,6 +1526,50 @@ <!-- ====================================================================== --> +<h2 id='symbols-function'> +Defining Anonymous Counter Styles: the ''symbols()'' function</h2> + + <p>The previous chapter specified a way to define custom counter styles. However, counter styles are sometimes used only once in a stylesheet, and defining a full ''@counter-style'' rule can be overkill for this case (not to mention the possibility of unintentional name collisions). To address this case, the ''symbols()'' function provides a simple way to define an anonymous counter style as an inline value. It does not provide the full feature-set of the ''@counter-style'' rule, but provides a sufficient subset to still be useful. The syntax of the ''symbols()'' rule is:</p> + + <pre><dfn id='type-symbols-function'><symbols-function></dfn> = symbols( <glyphs> [as <type>]? )</pre> + + <p>Where <glyphs> is a valid value for the 'glyphs' descriptor in a ''@counter-style'' rule, and <type> is one of the following keywords: ''repeating'', ''numeric'', ''alphabetic'', ''symbolic'', or ''non-repeating''.</p> + + <p>The ''symbols()'' function defines an anonymous counter style with no <i title="counter-name">name</i>, a <i title="counter-prefix">prefix</i> and <i title="counter-suffix">suffix</i> of ''""'' (the empty string), a <i title="counter-lower-bound">lower bound</i> of negative infinity, an <i title="counter-upper-bound">upper bound</i> of infinity, an <i title="counter-fallback">fallback style</i> of ''decimal'', and a <i title="counter-negative">negative sign</i> of "\2D" ("-" hyphen-minus). If the <type> was provided in the arguments, the counter style's <i title="counter-algorithm">algorithm</i> is constructed as described in the previous chapter using the provided type and the provided <glyphs> as the value of the 'glyphs' property; if no <type> was provided, it's constructed using the ''symbolic'' type and the provided <glyphs> as the value of the 'glyphs' property.</p> + + <div class='example'> + <p>This code:</p> + + <pre>ol { list-style: symbols("*" "\2020" "\2021" "\A7"); }</pre> + + <p>will produce lists that look like:</p> + + <pre> +* One +† Two +‡ Three +§ Four +** Five +†† Six +‡‡ Seven</pre> + + <p>On the other hand, specifying the type of counter, like so:</p> + + <pre>ol { list-style: symbols("*" "\2020" "\2021" "\A7" "#" as repeating); }</pre> + + <p>will produce lists that look like:</p> + + <pre> +* One +† Two +‡ Three +§ Four +* Five +† Six +‡ Seven</pre> + </div> + + <h2 id='ua-stylesheet'> Predefined Counter Styles</h2>
Received on Tuesday, 1 November 2011 21:29:31 UTC