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

Re: [css3-lists] Proposal for a generic numeric list-style-type

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 18 May 2010 09:00:31 -0700
Message-ID: <AANLkTikQnHFw-lXsIBgO6hR5xck3guCSemTPYkDnbxC7@mail.gmail.com>
To: Markus Ernst <derernst@gmx.ch>
Cc: timeless <timeless@gmail.com>, Simetrical+w3c@gmail.com, www-style@w3.org, gabriele.romanato@gmail.com
On Tue, May 18, 2010 at 1:55 AM, Markus Ernst <derernst@gmx.ch> wrote:
> To achieve this with the current CSS3 spec I need to specify the list-style-type value separately for all languages used. Even more, I need to know the exact HTML structure when writing the CSS, as language attributes can occur in any of the parent elements of the list. So, from an author's POV a generic numeric value seems highly desirable to me.

You don't have to know anything about the structure of the document,
or the locations of the actual @lang attributes.  The :lang
pseudoclass operates on the language of the element, which "inherits"
from its ancestors.  Check out the example in Selectors:

Note the difference between [lang|=xx] and :lang(xx). In this HTML
example, only the BODY matches [lang|=fr] (because it has a LANG
attribute) but both the BODY and the P match :lang(fr) (because both
are in French).

<body lang=fr>
  <p>Je suis Fran├žais.</p>

So, if you really wanted to internationalize your list markers, just
put in a handful of rules in your global CSS for every language you

ol:lang(zh) { list-style-type: ...}
ol:lang(uk) {...}
ol:lang(he) {...}

Received on Tuesday, 18 May 2010 16:08:56 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:46 UTC