Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep list numbers continuous when separated by certain elements #3086

Merged
merged 1 commit into from
Jul 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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