Proposal
Extension of CSS numbering systems

 

Author : Daniel Glazman, Electricité de France, Research and Development Division
Date : 18 june1998

Introduction

CSS 2 introduces a set of numbering systems for lists (list-style-type property) and counters (counter() and counters() functional notations). Counters functional notations can use a value of the list-style-type property that will rule the rendition. Here is the current CSS 2 list-style-property definition :

list-style-type

Values: disc | circle | square | decimal | western-decimal | leading-zero | lower-roman | upper-roman | lower-greek | lower-alpha | upper-alpha | lower-latin | upper-latin | hebrew | armenian | georgian | cjk-ideographic | hiragana | katakana | hiragana-iroha | katakana-iroha | none | inherit
Applies to: elements with display : list-item
Inherited: yes
Percentages: no
Media: visual

This definition does not cover all document providers' needs and is restrictive in comparison with common text editors (e.g. Microsoft Word). It has been proposed, during the May 1998 ftf meeting in Clamart to extend in CSS 3 the list of handled numbering systems :

Here is a non exhaustive list of the most common traditional numbering systems of the world (except western-decimal). Armenian and Gorgian are not in this list because I've already posted a long message about these important and specific numbering systems.

Script Numbering system(s) Associated language(s) Millions of locutors
Devanagari decimal Sanskrit, Hindi, Bihari, Marathi, ... 420+
Gurmukhi decimal + arabic Punjabi ~85
Gujrati decimal Northern India languages ~35
Orija decimal Southern India languages ~25
Bengali decimal Bengali, Assamese, Manipuri, Munda, ... 170+
Tamil multiplicative-additive + arabic Tamil 55+
Telugu decimal + arabic Telugu 65
Kannada decimal + arabic Kannada, Kannarese 30
Malayalam decimal + arabic + multiplicative-additive Malayalam 30
Singhalese multiplicative-additive + arabic Singhalese 12
Burmese decimal Burmese 30
Dhivehi decimal + arabic Maldivian 0.2
Khmer decimal Cambodian (a.k.a. Khmer) 7
Thaï decimal Thaï Thaï+Lao = 60
Lao decimal Lao Thaï+Lao = 60
Amharic multiplicative-additive Ethiopian (a.k.a Amharic), Tigray, Tigrinya, Oromo 50
Mongolian decimal Mongolian 6
Tibetan decimal Tibetan 6

Most common numbering systems in the world (decreasing order) : Western-decimal, Roman, Devanagari, Oriya, Arabic, Chinese, Tibetan, Burmese, Thaï, Khmer, Amharic, Greek.

Where and how ?

The list of values above is clearly mixing a lot of notions :

Extension of CSS numbering systems to other alphabets (ethiopic a.k.a. amharic, malayalam, cinghalese, ...) and to other styles (ordinals, cardinals, ordinal words, cardinal words) raises some problems :

  1. extension of the list of values above to new alphabets is possible but introduction of ordinals, cardinals and words will dramatically increase the length of that list; furthermore, it is not the common practice in CSS to agregate different notions in one single namespace.
  2. other possible solutions must preserve the counter() and counters() functional notations.

Because of CSS error handling (section 4.2), it is not possible to add a second value to list-style-type property and preserve a backwards compatibility. On an other hand, new browsers should preserve correct rendering for CSS 2 conformant style sheets.

Proposal

It is proposed to add new properties for list numbering and turn list-style-type property into a shorthand property. This will allow backwards compatibility : CSS 2 style sheets using list markers will also be CSS 3 style sheets. Some of the properties below are allowed with another media than visual : aural, for accessibility reasons.

list-numbering-style

Values: none | symbol | ordinals | cardinals | inherit
Initial: symbol
Applies to: elements with display : list-item
Inherited: yes
Percentages: N/A
Media: visual, aural

This property specifies appearance of the list item marker.

none
No marker specified
symbol
if 'list-style-image' has the value none or if the image pointed to by the URI cannot be displayed, appearance of the marker is specified by the value of 'list-numbering-type' property.
cardinals
marker is a cardinal number, the numbering system being given by the value of 'list-numbering-type' property. For instance in English : 1, 2, 3, 4, ... or one, two, three, four, ...
ordinals
marker is an ordinal number, the numbering system being given by the value of 'list-numbering-type' property. For instance in English : 1st, 2nd, 3rd, 4th, ... or first, second, third, forth, ...

 

list-numbering-aspect

Value: figures | words | inherit
Initial: figures
Applies to: elements with value for list-numbering-style being ordinals or cardinals
Inherited: yes
Percentages: N/A
Media: visual

This property specifies the aspect of the marker if 'list-numbering-style' has the value ordinals or cardinals.

figures
numbering must be done using numbers, the numbering system being given by the value of 'list-numbering-type' property.
words
numbering must be done using the word equivalent of each number, the numbering system being given by the value of 'list-numbering-type' property. The language of the list item element is used to determine this word.

 

list-numbering-type

Values: disc | circle | square | decimal | western-decimal | leading-zero | arabic-decimal | eastern-arabic-decimal | devanagari-decimal | bengali-decimal | gurmukhi-decimal | gujrati-decimal | orija-decimal | tamil-decimal | telugu-decimal | kannada-decimal | malayalam-decimal | thai-decimal | lao-decimal | tibetan-decimal | singhalese-decimal | dhivehi-decimal | mongolian-decimal | burmese-decimal | khmer-decimal | greek | greek-alphabetical | lower-greek | upper-greek | alpha | western-alphabetical | lower-alpha | upper-alpha | latin | lower-latin | upper-latin | roman | roman-traditional | lower-roman | upper-roman | armenian | armenian-traditional | hebrew | hebrew-traditional | georgian | georgian-traditional | cjk-ideographic | cjk-ideographic-traditional | hiragana | hiragana-traditional | katakana | katakana-traditional | hiragana-iroha | hiragana-iroha-traditional | katakana-iroha | katakana-iroha-traditional | tamil-traditional | malayalam-traditional | singhalese-traditional | ethiopic | amharic-traditional | none | inherit

Initial: disc
Applies to: elements with display : list-item
Inherited: yes
Percentages: N/A
Media: visual, aural

Values in italic are here for compatibility reasons with CSS 2 and are deprecated. The -decimal, -alphabetical or -traditional version should be used instead. Case should be indicated using the 'list-style-type' shorthand property. The ethiopic value becomes 'amharic-traditional' since Ethiopic is the name of a language and Amharic is the name of the associated script, used by Ethiopic and three other languages from Ethiopia and Eryrthrea. All values implying numbering based on ascii letters are deprecated in favor of western-alphabetical.

Glyphs markers :

disc
square
circle
glyph markers if 'list-numbering-style' has value symbol

Decimal numbering systems :

decimal
western-decimal
decimal numbers, beginning with 1
leading-zero
Decimal numbers 01, 02, 03 ... 99 (or 001, 002, 003, ... 999 if more than 99 items) ...
arabic-decimal
Arabic-Indic decimal numbers, beginning with 1
eastern-arabic-decimal
Eastern Arabic-Indic decimal numbers for Persian and Urdu, beginning with 1
devanagari-decimal
bengali-decimal
gurmukhi-decimal
gujarati-decimal
orija-decimal
tamil-decimal
telugu-decimal
kannada-decimal
malayalam-decimal
thai-decimal
lao-decimal
tibetan-decimal
singhalese-decimal
khmer-decimal
dhivahi-decimal
mongolian-decimal
burmese-decimal
Decimal numberings for Devanagari, Bengali, Gurmukhi, Gujarati, Orija, Tamil, Telugu, Kannada, Malayalam, Thaï, Lao, Tibetan, Singhalese, Khmer, Dhivahi (Maldivian), Mongolian and Burmese scripts, beginning with 1.

Alphabetical numbering systems :

greek
greek-alphabetical
lower-greek
lower case greek numerals (alpha, beta, gamma, ...)
latin
western-alphabetical
lower-latin
alpha
lower-alpha
Lower case ascii letters (a, b, c, ... z). Rendering is undefined after 26 items.
upper-latin
upper-alpha
Upper case ascii letters (A, B, C, ..., Z). Rendering is undefined after 26 items.

Traditional numbering systems :

roman
roman-traditional
lower-roman
lower case roman numerals (i, ii, iii, iv, v, ...)
upper-roman
upper case roman numerals (I, II, III, IV, V, ...)
armenian
armenian-traditional
Traditional lower case Armenian additive numbering (ayb, ben, gim, ..., zhe, zhe-ayb, ...)
georgian
georgian-traditional
Traditional Georgian (Mkhedruli script) additive numbering (an, ban, gan, ..., he, tan, in, in-an, ...)
hebrew
hebrew-traditional
Traditional Hebrew additive numbering
cjk-ideographic
cjk-ideographic-traditional
Plain Chinese ideographic numbers
hiragana
hiragana-traditional
Modern Japanese hiragana numbering according to a syllable table (a, i, u, e, o, ka, ki, ...)
katakana
katakana-traditional
Modern Japanese katakana numbering according to a syllable table (A, I, U, E, O, KA, KI, ...)
hiragana-iroha
hiragana-iroha-traditional
Traditional Japanese hiragana numbering according to a famous poem (i, ro, ha, ni, ho, he, to, ...)
katakana-iroha
katakana-iroha-traditional
Traditional Japanese katakana numbering according to a famous poem (I, RO, HA, NI, HO, HE, TP, ...)
tamil-traditional
malayalam-traditional
singhalese-traditional
Traditional multiplicative-additive numbering systems for Tamil, Malayalam and Singhalese
ethiopic
amharic-traditional
Traditional Amharic multiplicative-additive numbering
list-style-type

Values: [ '<list-numbering-style>' || '<list-numbering-aspect>' || '<list-numbering-type>' || '<text-transform>' ] | inherit
Initial: see individual properties
Applies to: elements with display : list-item
Inherited: yes
Percentages: N/A
Media: visual, aural

This is now a shorthand property. The none initial value of 'test-transform' implies a lower case numbering if this information is relevant.

Leading zero

Without implicit evidence that other decimal systems than western-decimal use the leading zero notation, it is suggested to drop this problem and not to build a new property.

Counters

The definition of counter() functional notation remains unchanged. It can still use as second argument the values of 'list-style-type' shorthand property.

Gender and other grammatical relations

It is extremely difficult to obtain the gender of each marker of a numbering sequence according to the text before or after the marker and the language of this text. In some language, for instance from the finno-hungarian group, numbers can also be accorded with the declination ( ?) of the following word. In Estonian and Finnish, there are at least 12 declinations per word !...

Even if I expressed a very strong interest in this feature during the Clamart ftf meeting, I suggest to drop this problem or follow ChrisW proposal and discuss a way to declare that the user agent should, if it can handle such an operation, try to modify the gender, number and declination of the list marker depending on the contents of the containing LI and leave that user-agent-dependant. I see no other way to solve this problem in simple terms that we could add to CSS.

As Martin Dürst pointed it out in the w3c-css-wg mailing list, the gender information is extremely important for ACSS rendering of a list marker using a numbering system. I am very circumspect about the way to set this information. Is it an attribute on the list item element or is it a style of the marker only ? What happens if the contents of the list item - and its gender - is modified ? If the gender of the marker is handled by CSS, fixing the gender needs a second operation. As a document provider, I don't think this is normal.

In my opinion, this problem may be linked with content and I18N, maybe not with styles. Are a namespace of grammatical attributes and selection on these attributes in CSS a correct answer ? (naive question)

Annex 1 : Numbering systems

amharic-traditional

arabic-decimal

armenian-traditional (lower case on 1st line, upper case on 2nd)

bengali-decimal

burmese-decimal

cjk-ideographic-traditional

devanagari-decimal

dhivehi-decimal (Maldivian)

eastern-arabic-decimal


georgian-traditional


gujarati-decimal


gurmukhi-decimal


hebrew-traditional


khmer-decimal


lao-decimal

roman-traditional


malayalam-decimal


malayalam-traditional


mongolian-decimal


orija-decimal


singhalese-traditional (-decimal : from 1 to 9 only)


tamil-traditional (-decimal : from 1 to 9 only)


telugu-decimal


thai-decimal


tibetan-decimal