Skip to content

Commit

Permalink
keep list numbers continuous when separated by certain elements
Browse files Browse the repository at this point in the history
  • Loading branch information
luin committed Jul 2, 2020
1 parent a201e1d commit 586e49a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions assets/core.styl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ resets(arr)

.ql-editor
box-sizing: border-box
counter-reset: list-0
counter-reset: resets(0..MAX_INDENT)
line-height: 1.42
height: 100%
outline: none
Expand Down Expand Up @@ -90,7 +90,10 @@ resets(arr)
content: '\2610'

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

for num in (1..MAX_INDENT)
.ql-indent-{num}:not(.ql-direction-rtl)
Expand Down

0 comments on commit 586e49a

Please sign in to comment.