W3C home > Mailing lists > Public > www-style@w3.org > June 2011

Re: [css3-lists] Published as WD!

From: Håkon Wium Lie <howcome@opera.com>
Date: Wed, 1 Jun 2011 11:21:20 +0200
Message-ID: <19942.1168.671560.432490@gargle.gargle.HOWL>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
Also sprach Tab Atkins Jr.:

 > The Lists module was just published as WD today, at
 > <http://www.w3.org/TR/css3-lists/>.  The previous WD was published *8
 > 1/2* years ago.  Unless I get hit by a bus, we'll finish the process
 > to Rec in less time than that.  ^_^

We'll see :-)

I have not gone through the draft in detail. But I have been looking at
section 8 and I marvel at the amazing options it provides. Good work!

The ability to (re)define your own list styles is great. It means I
can easily add Norwegian letters as a numbering system:

@counter-style lower-norwegian {
  type: alphabetic;
  glyphs: 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 
     'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z' 'æ' 'ø' 'å';
}

Now, as I've said before, I've never actually seen a list which runs
into the æøå range (although David was able to find one [1]). So, I
will not propose that we include lower-norwegian among the predefined
styles. And I think we should prune the proposed list of predefined
styles; I suspect that many of the other predefined counter styles
rarely will be used. 

See below for more on this.

--

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.

--

The algorithms in the draft are sometimes hard to read. These two can be 
hard to distinguish:

  <i>I</>  
  /

I suggest using another variable than <i>I</i>.

--

I can read the pseudo-algorithm in 8.1.3 fairly easily. Numbered steps
are good. I suggest using numbered steps in 8.1.4 as well.

--

8.1.4 says:

  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.

--

In 8.1.6, step 3 seems to be missing: <i>I</i> is never set to a new value

--

Section 9.1. lists Predefined Repeating Styles

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.

--

Section 9.2 lists Predefined Numeric Styles

Most ordered lists are numbered, I believe (as opposed to using
alphabetic markers). I therefore have a higher capacity for predefined
numeric styles that other styles. But, I don't think we need 'binary',
'fullwidth-decimal', 'lower-hexadecimal', 'new-base-60',
'super-decimal', 'octal', 'upper-hexadecimal'.

(Again, if people need them, they can easily be added.)

--

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.

--

Section 9.4 lists Predefined Symbolic Styles

I think we should use 'asterisk' (instead of 'asterisks') and
'footnote' (intead of 'footnotes'), like we do in 'italic' and
'@footnote'. 

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.

--

Section 9.5 lists predefined Non-Repeating Styles

It seems that all series that have Unicode points have been added
here? As a result we have 'double-circled-decimal' and
'parenthesized-decimal' (done through Unicode). I can only imagine the
discussions leading up to these being added to Unicode, but I don't
think they should automatically end up being predefined in CSS.

The use case is limited, and authors who want to use them can easily
do so by using @counter-style. I suggest removing the requirement to
predefine these, but list them in an appendix.

(When adding sample CSS code to the spec, it would be good to use
shorter lines or allow breaks in the code.)

--

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)).

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).

--

Section 10 defines complex counter styles that cannot be described
declaratively: 'ethiopic-numeric' and 'simp-chinese-informal',
'simp-chinese-formal', 'trad-chinese-informal', 'trad-chinese-formal'.
I sympathize with wanting to do numeric lists in your own language
automatically. I symphtize less with having several variants being
predefined.

Also, rather than defining algorithms for how to concatenate glyphs
into numbers, it may be easiser to write out the list of
numbers/strings. The ED states:

  In practice, lists are rarely numbered above ten thousand, so these
  styles have been limited to their first "group".

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.

[1] http://lists.w3.org/Archives/Public/www-style/2011Apr/0727.html
[2] http://devfiles.myopera.com/articles/532/elemlist-url.htm

Cheers,

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Wednesday, 1 June 2011 09:21:53 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:41 GMT