Re: [css3-lists] Published as WD!

On Sun, Jun 19, 2011 at 7:43 AM, Håkon Wium Lie <howcome@opera.com> wrote:
> Also sprach Tab Atkins Jr.:
>
>  > > To make the representation slightly more compact and readable, perhaps
>  > > we could find a way to write:
>  > >
>  > > @counter-style lower-norwegian {
>  > >  type: alphabetic;
>  > >  glyphs: 'abcdefghijklmnopqrstuvwxyzæøå';
>  > > }
>  > >
>  > > That is, if 'glyphs' only has one string value, it is interpreted as a
>  > > sequence of single characters.
>  >
>  > I had thought of this, but decided against it originally.  The problem
>  > is that it's ambiguous with the value of a 'repeating' or
>  > 'non-repeating' type.  It's perfectly fine, for example, to have a
>  > style like this:
>  >
>  > @counter-style abc {
>  >  type: repeating;
>  >  glyphs: 'abc';
>  > }
>
> So, when does the ambiguity appear?

The counter style written above produces lists like:

abc. First item
abc. Second item
abc. Third item
abc. Fourth item

Your proposal would make it ambiguous whether it should produce the
above, or instead produce:

a. First item
b. Second item
c. Third item
a. Fourth item

This ambiguity doesn't exist for the 'numeric' and 'alphabetic' types,
because they require at least two glyphs normally.  But I'd be
strongly opposed to allowing the shortcut only for those two types.

Nor can you get around the ambiguity by trying to say that you get the
latter behavior if the string is multiple characters.  It is perfectly
valid and potentially useful to have multi-character counter glyphs.


>  > >  The ‘symbolic’ counter type cycles repeatedly through its provided
>  > >  glyphs, doubling, tripling, etc. the glyphs on each successive pass
>  > >  through the list. It can be used for footnote-style markers, and is
>  > >  also sometimes used for alphabetic-style lists for a slightly
>  > >  different presentation than what the ‘alphabetic’ type presents.
>  > >
>  > > I don't intuitively understand what "doubling, tripling, etc." means.
>  > > An example of how this differs from 'alphabetic' would be helpful.
>  >
>  > Would this be addressed by simply providing a better example?  The
>  > current example symbolic style, 'unary', is unfortunately the exact
>  > same if I used 'alphabetic'.  I've switched it to using
>  > 'upper-alpha-symbolic' as an example, and put in a note specifically
>  > calling out the difference between it and 'upper-alpha'.
>
> Examples are good, but I still think you need to describe what
> "doubling" or "tripling" means. It's defined in the pseudo-algorithm,
> but that's hard to read.
>
> How about:
>
>  The ‘symbolic’ counter type cycles repeatedly through its provided
>  glyphs. At the end of a cycle, the string length is increased by
>  adding one more glyph of the same kind.
>
>  Example:
>
>    @counter-style foo {
>        type: symbolic;
>        glyphs: 'A' 'B';
>    }
>
>   will produce a list like this:
>
>      A.
>      B.
>      AA.
>      BB.
>      AAA.
>      BBB.

I couldn't come up with a way of avoiding using "doubling" without
either being unclear or just restating the pseudoalgorithm in text.
Instead, I've added a simple inline example to the text.  Please let
me know if this is okay!

(I've also finally moved the footnotes counter-style to being an
example for symbolic, like I said I'd do earlier.)


>  > > It's nice to see how to create simple one-glyph lists. I suggest
>  > > keeping the list-style-types defined in CSS 2.1 in the list of
>  > > predefined styles (circle, disc, square), but not add new predefined
>  > > counter styles. For example, I don't think 'check' should be
>  > > predefined. Different languages/traditions use different marks in
>  > > check boxes. And if people want to use 'check' to see '✓', they can
>  > > easily add it themselves.
>
> Based on comments from Brad and Charles Belov, I can see that some
> list types are common enough to warrant addition in the new specification.
>
>  > > Section 9.3 lists Predefined Alphabetic Styles
>  > >
>  > > Hmm. Are all these used? Are they correct? Are they there
>  > > automatically because they have entered Unicode?
>  > >
>  > > When in doubt, I'd rather leave it to the author to define them.
>  >
>  > For the most part, these are present because the previous WD defined
>  > them.  I can drop many of them, like the new repeating styles, if
>  > necessary.
>
> I suggest listing them in an appendix as examples for others to
> cut/and paste from. But I don't think they should be predefined.
>
> I specifically suggest make all the predefined styles non-predefined
> in the next version the WD.

I think the current predefined styles are useful, and would prefer
keeping them the way they are.  If you feel strongly about this, I
suggest bringing it up as an issue for the WG to decide on at a future
telcon.


>  > > But I don't think these should be predefined. Footnote marker vary
>  > > widely and sanctioning one specific list seems wrong. The
>  > > 'lower-alpha-symbolic' and 'upper-alpha-symbolic' gives a slightly
>  > > different result than 'lower-alpha' and 'upper-alpha', but I'm not
>  > > convinced this warrants predefined status.
>  >
>  > How about I move the 'footnote' style into just being a symbolic example?
>
> Right, we should think of these -- foonote and others -- as examples,
> not as prescriptions.
>
>  > > Section 9.6 lists predefined additive styles. But are all of them
>  > > really necessary? For example, do we need to predefine
>  > > "simple-upper-roman" (which appears to be a variant of roman which is
>  > > slighly easier to read (unless you expect real roman, that is)).
>  >
>  > I've definitely seen the simple-*-roman variants used in real life.
>
> Pointers?

Various books, particularly schoolbooks which number their TOC or
appendix pages with roman numerals.


>  > > Given that these counter styles with can be added to any style
>  > > sheet, I think we should have very strict criteria for making these
>  > > counter styles predefined. We risk making mistakes, or adding styles
>  > > that are never used (like we did for lower-greek, it seems).
>  >
>  > What criteria would you propose?  Right now I'm more-or-less using the
>  > criteria of "used at least somewhat commonly in real-life lists".
>
> I suggest the critera to be that a counter style is actively used in
> print and in web documents, so common that people hardcode them into
> HTML to achieve the effects. Listing 10 different pages in the wild
> would be a requirement for starting discussions.

One problem with doing that is that I don't read anything other than
English, and thus don't have any way to do the research for this.


>  > > I'd say that lists are rarely numbered above 100. Thus, by listing
>  > > these number systems to 100 we can remove several algorithms from the
>  > > spec.
>  >
>  > I'd be fine with that, except that the WG has already resolved that we
>  > should define the general algorithm.
>
> Was the other alternative presented? I suggest listing the glyphs
> needed for these languages from 1-100 so that we more easily can
> compare the alternatives.

Given that the alternatives were "define it up to 10k (or 100k) with a
simpler algorithm" vs "define it up to 10^16 with a more complex
algorithm", and the WG explicitly chose the larger and more
complicated of the two, I highly doubt that "define it up to 100"
would have gotten a significant number of votes.  ^_^

~TJ

Received on Monday, 20 June 2011 21:11:33 UTC