W3C home > Mailing lists > Public > www-style@w3.org > May 2014

Re: [css-counter-styles] allow use of CSS4 "alt" property with @counter-style/symbols

From: Xidorn Quan <quanxunzhen@gmail.com>
Date: Thu, 15 May 2014 18:47:38 +1000
Message-ID: <CAMdq698TPZnBHWDURn6AfPO-ESgGN-scUZADniFFqk_kw8NKRA@mail.gmail.com>
To: James Craig <jcraig@apple.com>
Cc: Reece Dunn <msclrhd@googlemail.com>, www-style list <www-style@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
On Thu, May 15, 2014 at 11:36 AM, James Craig <jcraig@apple.com> wrote:

> Speak-as may account for some simple cases (like the numeric example
> below), but does not allow authors to designate alternative text for the
> symbol-based markers. If you just want numeric markers, there's no reason
> to use "symbols" at all.
> The following example is admittedly contrived, but is a better
> illustration of what cannot be accomplished with the "speak-as" property.
>     symbols: ◰ ◳ ◲ ◱;
>     alt: 'foo' 'bar' 'baz' 'bop';
> "speak-as" provides pretty good coverage of CSS 2's "list-style-type"
> property, but AFAICT it doesn't provide sufficient coverage of CSS3's
> "symbols" property.

Actually, it can do what you want it to do. Consider this:

@counter-style a {
  system: fixed;
  symbols: ◰ ◳ ◲ ◱;
  speak-as: b;

@counter-style b {
  system: fixed;
  symbols: foo bar baz bop;
  speak-as: alphabetic;

The spec seems to be ambiguous by saying alphabetic is "spell it out
letter-by-letter", but in my current implementation for Firefox, this
should give you exactly what you want.

- Xidorn
Received on Thursday, 15 May 2014 08:48:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:42 UTC