Skip to content

Commit

Permalink
Merge pull request slab#3506 from quilljs/zh-numbered-list
Browse files Browse the repository at this point in the history
Other list types should also reset list numbers
  • Loading branch information
jhchen committed Dec 17, 2021
2 parents 7b3263b + 10b120d commit cf9d835
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions assets/core.styl
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ resets(arr)
li[data-list=unchecked] > .ql-ui:before
content: '\2610'

li[data-list=ordered]
li[data-list]
@supports (counter-set: none)
counter-set: resets(1..MAX_INDENT)
@supports not (counter-set: none)
counter-reset: resets(1..MAX_INDENT)

li[data-list=ordered]
counter-increment: list-0
> .ql-ui:before
content: unquote('counter(list-0, ' + LIST_STYLE[0] + ')') '. '
Expand All @@ -113,7 +115,7 @@ resets(arr)
> .ql-ui:before
content: unquote('counter(list-' + num + ', ' + LIST_STYLE[num%3] + ')') '. '
if (num < MAX_INDENT)
li[data-list=ordered].ql-indent-{num}
li[data-list].ql-indent-{num}
@supports (counter-set: none)
counter-set: resets((num+1)..MAX_INDENT)
@supports not (counter-set: none)
Expand Down

0 comments on commit cf9d835

Please sign in to comment.