Skip to content

Commit 958f5c0

Browse files
committed
[css-counter-styles] Fixed up 'width', per SS's emails.
1 parent 6bc69ce commit 958f5c0

2 files changed

Lines changed: 42 additions & 24 deletions

File tree

css-counter-styles/Overview.html

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</a></p>
1414
<h1 class="p-name no-ref" id="title">CSS Counter Styles Level 3</h1>
1515
<h2 class="no-num no-toc no-ref" id="subtitle">Editor's Draft,
16-
<span class="dt-updated"><span class="value-title" title="20130403">3 April 2013</span></span></h2>
16+
<span class="dt-updated"><span class="value-title" title="20130409">9 April 2013</span></span></h2>
1717
<div data-fill-with="spec-metadata"><dl><dt>This version:</dt><dd><a href="http://dev.w3.org/csswg/css-counter-styles/" class="u-url">http://dev.w3.org/csswg/css-counter-styles/</a></dd><dt>Latest version:</dt><dd><a href="http://w3.org/TR/css-counter-styles-3/">http://w3.org/TR/css-counter-styles-3/</a></dd><dt>Editor's Draft:</dt><dd><a href="http://dev.w3.org/csswg/css-counter-styles/">http://dev.w3.org/csswg/css-counter-styles/</a></dd><dt>Previous Versions:</dt><dd><a href="http://www.w3.org/TR/2012/WD-css-counter-styles-3-20121009/" rel="previous">http://www.w3.org/TR/2012/WD-css-counter-styles-3-20121009/</a>
1818
</dd><dt>Feedback:</dt>
1919
<dd><a href="mailto:www-style@w3.org?subject=%5Bcss-counter-styles%5D%20feedback">www-style@w3.org</a>
@@ -117,6 +117,7 @@ <h2 id="contents" class="no-num no-toc no-ref">Table of contents</h2>
117117
Index</a></li><li><a href="#property-index">
118118
Property index</a></li></ul></div>
119119

120+
120121
<style>
121122
pre.stylesheet { white-space: pre-wrap; }
122123
</style>
@@ -798,21 +799,20 @@ <h4 id="additive-system" data-level="3.1.6"><span class="secno">3.1.6 </span>
798799
Representations larger than the specified width are constructed as normal.
799800

800801
</p><dl>
801-
<dt>auto
802-
</dt><dd>
803-
This descriptor has no effect on counter representations.
804-
805-
</dd><dt><var>&lt;integer&gt;</var> &amp;&amp; <var>&lt;symbol&gt;</var>
802+
<dt><a data-autolink="link" class="production"><var>&lt;integer&gt;</var></a> &amp;&amp; <a data-autolink="link" class="production" href="#symbol-production"><var>&lt;symbol&gt;</var></a>
806803
</dt><dd>
807-
The <var>&lt;integer&gt;</var> specifies a minimum width that all counter representations must reach.
808-
If a counter representation would be generated using less <var>&lt;symbol&gt;</var>s than the specified <var>&lt;integer&gt;</var>
804+
The <a data-autolink="link" class="production"><var>&lt;integer&gt;</var></a> specifies a minimum width that all counter representations must reach.
805+
If a counter representation would be generated using less <a data-autolink="link" class="production" href="#symbol-production"><var>&lt;symbol&gt;</var></a>s than the specified <a data-autolink="link" class="production"><var>&lt;integer&gt;</var></a>
809806
(before adding prefixes/suffixes/negatives),
810-
prepend copies of the specified <var>&lt;symbol&gt;</var> to the representation
807+
prepend copies of the specified <a data-autolink="link" class="production" href="#symbol-production"><var>&lt;symbol&gt;</var></a> to the representation
811808
until the number of symbols reaches the specified width.
812809

813-
<p> If the counter value is negative
810+
<p> The <a data-autolink="link" class="production"><var>&lt;integer&gt;</var></a> must be non-negative.
811+
A negative value is a syntax error.
812+
813+
</p><p> If the counter value is negative
814814
and the counter style is <a data-autolink="link" href="#negative-capable">negative-capable</a>,
815-
reduce the width by one or two when determining how many copies to prepend,
815+
treat the minimum width as being one or two smaller when determining how many copies to prepend,
816816
depending on whether the <a data-autolink="property" class="property" title="negative" href="#negative">negative</a> descriptor's value is one or two <var>&lt;symbol&gt;</var>s.
817817
</p></dd></dl>
818818

@@ -826,11 +826,20 @@ <h4 id="additive-system" data-level="3.1.6"><span class="secno">3.1.6 </span>
826826
1 to be represented as "001",
827827
20 to be represented as "020",
828828
300 to be represented as "300",
829-
and -4 to be represented as "-04".
829+
4000 to be represented as "4000",
830+
and -5 to be represented as "-05".
830831
</p></div>
831832

833+
<p class="note"> Note: The <a data-autolink="property" class="property" title="width" href="#width">width</a> descriptor counts the number of <em><a data-autolink="link" class="production" href="#symbol-production"><var>&lt;symbol&gt;</var></a>s</em> used to construct the representation,
834+
not the number of characters,
835+
and also pads the representation with <a data-autolink="link" class="production" href="#symbol-production"><var>&lt;symbol&gt;</var></a>s.
836+
For many styles, the distinction is irrelevant,
837+
as all the <a data-autolink="link" class="production" href="#symbol-production"><var>&lt;symbol&gt;</var></a>s are single-chararacter,
838+
but if a style uses multi-character <a data-autolink="link" class="production" href="#symbol-production"><var>&lt;symbol&gt;</var></a>s,
839+
care must be taken not to accidentally specify <a data-autolink="property" class="property" title="width" href="#width">width</a> in terms of characters.
840+
832841

833-
<h3 id="counter-style-fallback" data-level="3.7"><span class="secno">3.7 </span>
842+
</p><h3 id="counter-style-fallback" data-level="3.7"><span class="secno">3.7 </span>
834843
Defining fallback: the <a data-autolink="property" class="property" title="fallback" href="#fallback">fallback</a> descriptor</h3>
835844

836845
<table class="descdef">
@@ -3373,7 +3382,7 @@ <h3 class="no-ref" id="testing">
33733382

33743383
<h3 id="normative" class="no-num no-ref">
33753384
Normative References</h3>
3376-
<div data-fill-with="normative-references"><dl><dt id="rfc2119" title="RFC2119">[RFC2119]</dt><dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt">Key words for use in RFCs to Indicate Requirement Levels</a>. URL: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a></dd><dt id="css3-writing-modes" title="CSS3-WRITING-MODES">[CSS3-WRITING-MODES]</dt><dd>Elika J. Etemad; Koji Ishii. <a href="http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/">CSS Writing Modes Module Level 3</a>. 15 November 2012. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/">http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/</a></dd></dl></div>
3385+
<div data-fill-with="normative-references"><dl><dt id="css3-writing-modes" title="CSS3-WRITING-MODES">[CSS3-WRITING-MODES]</dt><dd>Elika J. Etemad; Koji Ishii. <a href="http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/">CSS Writing Modes Module Level 3</a>. 15 November 2012. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/">http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/</a></dd><dt id="rfc2119" title="RFC2119">[RFC2119]</dt><dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt">Key words for use in RFCs to Indicate Requirement Levels</a>. URL: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a></dd></dl></div>
33773386

33783387
<h3 id="informative" class="no-num no-ref">
33793388
Informative References</h3>

css-counter-styles/Overview.src.html

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<h1>CSS Counter Styles Level 3</h1>
2+
23
<pre class=metadata>
34
Shortname: css-counter-styles
45
Level: 3
@@ -732,21 +733,20 @@ <h3 id='counter-style-width'>
732733
Representations larger than the specified width are constructed as normal.
733734

734735
<dl>
735-
<dt>auto
736-
<dd>
737-
This descriptor has no effect on counter representations.
738-
739-
<dt><var>&lt;integer></var> &amp;&amp; <var>&lt;symbol></var>
736+
<dt><<integer>> &amp;&amp; <<symbol>>
740737
<dd>
741-
The <var>&lt;integer></var> specifies a minimum width that all counter representations must reach.
742-
If a counter representation would be generated using less <var>&lt;symbol></var>s than the specified <var>&lt;integer></var>
738+
The <<integer>> specifies a minimum width that all counter representations must reach.
739+
If a counter representation would be generated using less <<symbol>>s than the specified <<integer>>
743740
(before adding prefixes/suffixes/negatives),
744-
prepend copies of the specified <var>&lt;symbol></var> to the representation
741+
prepend copies of the specified <<symbol>> to the representation
745742
until the number of symbols reaches the specified width.
746743

744+
The <<integer>> must be non-negative.
745+
A negative value is a syntax error.
746+
747747
If the counter value is negative
748748
and the counter style is <i>negative-capable</i>,
749-
reduce the width by one or two when determining how many copies to prepend,
749+
treat the minimum width as being one or two smaller when determining how many copies to prepend,
750750
depending on whether the 'negative' descriptor's value is one or two <var>&lt;symbol></var>s.
751751
</dl>
752752

@@ -760,9 +760,18 @@ <h3 id='counter-style-width'>
760760
1 to be represented as "001",
761761
20 to be represented as "020",
762762
300 to be represented as "300",
763-
and -4 to be represented as "-04".
763+
4000 to be represented as "4000",
764+
and -5 to be represented as "-05".
764765
</div>
765766

767+
Note: The 'width' descriptor counts the number of <em><<symbol>>s</em> used to construct the representation,
768+
not the number of characters,
769+
and also pads the representation with <<symbol>>s.
770+
For many styles, the distinction is irrelevant,
771+
as all the <<symbol>>s are single-chararacter,
772+
but if a style uses multi-character <<symbol>>s,
773+
care must be taken not to accidentally specify 'width' in terms of characters.
774+
766775

767776
<h3 id='counter-style-fallback'>
768777
Defining fallback: the 'fallback' descriptor</h3>

0 commit comments

Comments
 (0)