Skip to content

Commit 2afd808

Browse files
committed
Added an issue about representing the complex counter styles with fallback hackery.
1 parent 7548f53 commit 2afd808

2 files changed

Lines changed: 80 additions & 0 deletions

File tree

css-counter-styles/Overview.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,6 +1754,51 @@ <h3 id=cjk-counter-styles><span class=secno>2.3. </span> The Chinese
17541754
39   三十九 79   七十九 119 一百一十九
17551755
40    四十 80    八十 120  一百二十</pre>
17561756
</div>
1757+
1758+
<div class=issue>
1759+
<p>It's possible, with some fallback hackery, to represent these styles
1760+
with a @counter-style rule. For example, the following 11 styles would
1761+
serve to represent &lsquo;<a href="#simp-chinese-informal0"><code
1762+
class=css>simp-chinese-informal</code></a>&rsquo; between 0 and 999:</p>
1763+
1764+
<pre>
1765+
@counter-style simp-chinese-informal {
1766+
type: non-repeating 101;
1767+
fallback: simp-chinese-informal-200;
1768+
symbols: 一百零一 一百零二 一百零三 一百零四 一百零五 一百零六 一百零七 一百零八 一百零九;
1769+
}
1770+
@counter-style simp-chinese-informal-200 {
1771+
type: non-repeating 201;
1772+
fallback: simp-chinese-informal-300;
1773+
symbols: 二百零一 二百零二 二百零三 二百零四 二百零五 二百零六 二百零七 二百零八 二百零九;
1774+
}
1775+
/* etc for 300 through 900*/
1776+
@counter-style simp-chinese-informal-10 {
1777+
type: non-repeating 10;
1778+
fallback: simp-chinese-informal-rest;
1779+
symbols: 十 十一 十二 十三 十四 十五 十六 十七 十八 十九;
1780+
}
1781+
@counter-style simp-chinese-informal-rest {
1782+
type: additive;
1783+
range: 0 999;
1784+
fallback: cjk-decimal;
1785+
additive-symbols: 900 九百, 800 八百, 700 七百, 600 六百, 500 五百, 400 四百,
1786+
300 三百, 200 二百, 100 一百, 90 九十, 80 八十, 70 七十, 60 六十, 50 五十, 40 四十, 30
1787+
三十, 20 二十, 10 一十, 9 九, 8 八, 7 七, 6 六, 5 五, 4 四, 3 三, 2 二, 1 一, 0 零;
1788+
}</pre>
1789+
1790+
<p>If Lists allowed multiple ranges, the -100 through -900 styles could be
1791+
collapsed into a single additive style, for a total of only 3
1792+
@counter-style rules, and up to 9999 could be done with (I believe) 2
1793+
additional rules. If Lists was altered to let non-numeric styles
1794+
represent negative values, the negative half of the range could be
1795+
represented without any extra rules.</p>
1796+
1797+
<p>All of the Chinese longhand styles are nearly identical, and
1798+
ethiopian-numeric can be represented in a similar fashion. Is this too
1799+
hacky for me to represent them officially using this strategy, or is it
1800+
okay?</p>
1801+
</div>
17571802
<!-- ====================================================================== -->
17581803

17591804
<h2 id=optional-extensions><span class=secno>3. </span> Optional Extended

css-counter-styles/Overview.src.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,6 +1353,41 @@ <h3 id='cjk-counter-styles'>
13531353
40    四十 80    八十 120  一百二十</pre>
13541354
</div>
13551355

1356+
<div class='issue'>
1357+
<p>It's possible, with some fallback hackery, to represent these styles with a @counter-style rule. For example, the following 11 styles would serve to represent ''simp-chinese-informal'' between 0 and 999:</p>
1358+
1359+
<pre>
1360+
@counter-style simp-chinese-informal {
1361+
type: non-repeating 101;
1362+
fallback: simp-chinese-informal-200;
1363+
symbols: 一百零一 一百零二 一百零三 一百零四 一百零五 一百零六 一百零七 一百零八 一百零九;
1364+
}
1365+
@counter-style simp-chinese-informal-200 {
1366+
type: non-repeating 201;
1367+
fallback: simp-chinese-informal-300;
1368+
symbols: 二百零一 二百零二 二百零三 二百零四 二百零五 二百零六 二百零七 二百零八 二百零九;
1369+
}
1370+
/* etc for 300 through 900*/
1371+
@counter-style simp-chinese-informal-10 {
1372+
type: non-repeating 10;
1373+
fallback: simp-chinese-informal-rest;
1374+
symbols: 十 十一 十二 十三 十四 十五 十六 十七 十八 十九;
1375+
}
1376+
@counter-style simp-chinese-informal-rest {
1377+
type: additive;
1378+
range: 0 999;
1379+
fallback: cjk-decimal;
1380+
additive-symbols: 900 九百, 800 八百, 700 七百, 600 六百, 500 五百, 400 四百,
1381+
300 三百, 200 二百, 100 一百, 90 九十, 80 八十, 70 七十, 60 六十, 50 五十, 40 四十, 30
1382+
三十, 20 二十, 10 一十, 9 九, 8 八, 7 七, 6 六, 5 五, 4 四, 3 三, 2 二, 1 一, 0 零;
1383+
}</pre>
1384+
1385+
<p>If Lists allowed multiple ranges, the -100 through -900 styles could be collapsed into a single additive style, for a total of only 3 @counter-style rules, and up to 9999 could be done with (I believe) 2 additional rules. If Lists was altered to let non-numeric styles represent negative values, the negative half of the range could be represented without any extra rules.</p>
1386+
1387+
<p>All of the Chinese longhand styles are nearly identical, and ethiopian-numeric can be represented in a similar fashion. Is this too hacky for me to represent them officially using this strategy, or is it okay?</p>
1388+
</div>
1389+
1390+
13561391
<!-- ====================================================================== -->
13571392

13581393
<h2 id='optional-extensions'>

0 commit comments

Comments
 (0)