Skip to content

New and alternative way to style the ordered list #4129

@haroun-b

Description

@haroun-b

Hi @ross-u ,

While browsing MDN, I stumbled across a new and simpler way to style <ol>s. It isn't as widely supported as the proposed solution, but it's supported well enough to be introduced. So, it would be cool if you guys could add it to the FAQ.

Implementation:

  @counter-style custom {
    system: extends decimal;
    suffix: ") ";
  }

  ol {
    list-style: custom;
  }

Docs: https://developer.mozilla.org/en-US/docs/Web/CSS/@counter-style

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions