Re: [css3-lists] remove "Complex Counter Styles" and "Optional Extended Counter Styles" sections

On Mon, Nov 28, 2011 at 6:43 AM, Håkon Wium Lie <howcome@opera.com> wrote:
> Also sprach Tab Atkins Jr.:
>>>>>> (Though, if we *did* decide that we didn't care about values past 100
>>>>>> or so, I'm pretty sure I could express them as an additive style in a
>>>>>> much shorter way than explicitly listing values in a non-repeating
>>>>>> style.)
>>>
>>> Seeing that, shorter, additive, description would also be helpful.
>>
>> It would look almost exactly like the shorter existing additive
>> styles.  To do the values up to 100 would take about 20
>> comma-separated values.  To do up 1000 would take 30, if it's
>> compatible.
>
> Is it?

Sorry for the lack of detail in that comment - I was answering emails
over vacation, and didn't have the time to actually dive in and check.

After doing so, I can confirm that I can represent up to 999 by using
extensive fallback trickery across 10 or 11 styles (the informal
styles take an extra fallback).  I could use the same trick to
represent up to 9999, but it would require, I think, another 200
styles.

I can't do the negative numbers, because the additive style prevents
it.  That's something that could potentially be changed.  As well,
this could be done with much fewer styles if I could provide multiple
ranges - I'd then be able to collapse the 100-900 non-repeating styles
into a single additive style, requiring a total of only 2 or 3 styles
for a range up to 999, and I think less than 10 styles for up to 9999.

Here's an example of one, the simp-chinese-informal style.  The others
are nearly identical.

@counter-style simp-chinese-informal {
  type: non-repeating 101;
  fallback: simp-chinese-informal-200;
  symbols: 一百零一 一百零二 一百零三 一百零四 一百零五 一百零六 一百零七 一百零八 一百零九;
}
@counter-style simp-chinese-informal-200 {
  type: non-repeating 201;
  fallback: simp-chinese-informal-300;
  symbols: 二百零一 二百零二 二百零三 二百零四 二百零五 二百零六 二百零七 二百零八 二百零九;
}
/* etc for 300 through 900*/
@counter-style simp-chinese-informal-10 {
  type: non-repeating 10;
  fallback: simp-chinese-informal-rest;
  symbols: 十 十一 十二 十三 十四 十五 十六 十七 十八 十九;
}
@counter-style simp-chinese-informal-rest {
  type: additive;
  range: 0 999;
  fallback: cjk-decimal;
  additive-symbols: 900 九百, 800 八百, 700 七百, 600 六百, 500 五百, 400 四百,
300 三百, 200 二百, 100 一百, 90 九十, 80 八十, 70 七十, 60 六十, 50 五十, 40 四十, 30
三十, 20 二十, 10 一十, 9 九, 8 八, 7 七, 6 六, 5 五, 4 四, 3 三, 2 二, 1 一, 0 零;
}

>  > >  > > That's a very good reason for writing it out. So, yes, I'd like to see it.
>  > >  >
>  > >  > I don't understand.  I didn't give a reason to write it out.  I gave
>  > >  > reasons *not* to write it out: it's a non-trivial amount of work for
>  > >  > me
>  > >
>  > > But you're asking UAs to implement the algorithm, no?
>  >
>  > I don't understand.  What does that have to do with this?
>
> The spec is asking people to review and (in due course) implement the
> pseudo-algorithm. In order to review/implement the pseudo-algorith, I
> believe one must have some idea of what it is meant to produce. If we
> had the first 100 values spelled out, a reviewer/implementor could see
> if there's a match: does the proposed algorithm produce the
> written-out values?
>
> As the ED stands, it's impossible for me to review the
> pseudo-algorithm in a meaningful way. And it's probably very hard to
> review, even if you write one of the languages in question. If the
> list of values were spelled out, however, a non-native implementor
> could check the results and a native speaker/writer could do even
> more.
>
> Another reason for writing it out is that we may see patterns that
> allow us to declare the values in a more compact form (like you have
> suggested).

Understood.  I already have an issue on them to at least provide
examples for each.  Here's the first 120 values for
simp-chinese-informal - the other three types are basically identical,
as I said previously:

  1     一    41   四十一    81   八十一
  2     二    42   四十二    82   八十二
  3     三    43   四十三    83   八十三
  4     四    44   四十四    84   八十四
  5     五    45   四十五    85   八十五
  6     六    46   四十六    86   八十六
  7     七    47   四十七    87   八十七
  8     八    48   四十八    88   八十八
  9     九    49   四十九    89   八十九
 10     十    50    五十    90    九十
 11    十一    51   五十一    91   九十一
 12    十二    52   五十二    92   九十二
 13    十三    53   五十三    93   九十三
 14    十四    54   五十四    94   九十四
 15    十五    55   五十五    95   九十五
 16    十六    56   五十六    96   九十六
 17    十七    57   五十七    97   九十七
 18    十八    58   五十八    98   九十八
 19    十九    59   五十九    99   九十九
 20    二十    60    六十   100    一百
 21   二十一    61   六十一   101  一百零一
 22   二十二    62   六十二   102  一百零二
 23   二十三    63   六十三   103  一百零三
 24   二十四    64   六十四   104  一百零四
 25   二十五    65   六十五   105  一百零五
 26   二十六    66   六十六   106  一百零六
 27   二十七    67   六十七   107  一百零七
 28   二十八    68   六十八   108  一百零八
 29   二十九    69   六十九   109  一百零九
 30    三十    70    七十   110  一百一十
 31   三十一    71   七十一   111 一百一十一
 32   三十二    72   七十二   112 一百一十二
 33   三十三    73   七十三   113 一百一十三
 34   三十四    74   七十四   114 一百一十四
 35   三十五    75   七十五   115 一百一十五
 36   三十六    76   七十六   116 一百一十六
 37   三十七    77   七十七   117 一百一十七
 38   三十八    78   七十八   118 一百一十八
 39   三十九    79   七十九   119 一百一十九
 40    四十    80    八十   120  一百二十

(Hopefully the spacing comes out correctly - I had to use a
combination of english and ideographic spaces.)

The only further wrinkle that's not shown in this sample (because you
have to reach 1000 before it shows itself) is that you must collapse
runs of consecutive 0s (零) to a single one.

~TJ

Received on Monday, 28 November 2011 17:49:49 UTC