Skip to content

Customised counter styles are unavailable — FIXED ! #93

Open

Description

@r12a

Customisable counters are needed for many languages.

Many orthographies use native digits or letters for counters, such as those used for list numbering or numbering chapter headings, etc. It needs to be possible to use these local conventions for counters.

Users also need to be able to adapt counter styles for a given context or create new ones where the browser doesn't have baked-in support. Often customisation needs are driven by the need to change the counter suffix for particular contexts, but in some cases the algorithms used for numbering can vary from author to author as well.

More: - [Tamil counters](https://www.w3.org/International/ilreq/tamil/#h_counters) - [N'Ko counters](https://www.w3.org/International/afrlreq/nko/#h_counters) - [Thai counters](https://www.w3.org/International/sealreq/thai/#h_counters)

These are just a few examples out of many.

The GAP

The major browser engines support a number of hard-coded counter styles. But when this gap was first reported only Gecko supported user defined counter styling. This meant that native counters were not available for a large number of languages, and the styles could not be tweaked by the author for special uses.

[predefined-counter-styles](https://w3c.github.io/predefined-counter-styles/) contains templates for counter styles that can be applied by users if the custom counter styles spec is supported.

[css-counter-styles-3](https://www.w3.org/TR/css-counter-styles-3/#simple-numeric) explicitly defines a number of local styles, and the other counter styles can be defined by users if the Counter Styles spec's generic mechanism for defining counter styles was implemented.

Priority

The impact of the lack of support cited here is mitigated by the tendency to use western counters, so the impact could be marked as advanced. However native styles (at least the numeric) are widely used in non-Web content, and these features are likely to be widely used when implemented across all major browsers. Therefore the priority is set to basic.

Tests & results

I18n test suite, Predefined styles.
Contains tests for the styles that are explicitly defined in the Counter Styles spec. Gecko and Blink provide good coverage. Webkit covers most styles with some gaps, but fails for CJK and Ethiopic styles.

I18n test suite, [Basic custom counter styles](https://w3c.github.io/i18n-tests/results/counter-styles#basics).
The spec is essentially done, and Gecko and Blink have implemented it. No support from Webkit.

Action taken

Blink • WebKit

Outcomes

Fixed ! Gecko, Blink, and Webkit latest browser versions now all support custom counter styles.

See Can I Use?

Activity

  1. r12a commented on Feb 5, 2020

    @r12a
    ContributorAuthor

    The first comment in this issue contains text that will automatically appear in one or more gap-analysis documents as a subsection with the same title as this issue. Any edits made to that comment will be immediately available in the document. Proposals for changes or discussion of the content can be made in comments below this point.

    Relevant gap analysis documents include:
    Adlam • Arabic/Persian • Bengali • Chinese • Devanagari • Ethiopic • Greek • Gujarati • Japanese • Kashmiri • Mongolian • N'Ko • Tamil • Uighur

  2. 25 remaining items

  3. added
    l:taTamil language & script
    l:guGujurati language & script
    l:paPunjabi, Gurmukhi script
    l:ksKashmiri
    s:bengBengali script
    s:devaDevanagari script
    s:gujrGurajati script
    s:guruGurmukhi script
    s:tamlTamil script
    l:asAssamese
    on Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions