Skip to content

Commit

Permalink
fix: reset counter list for nested li inside details (#998)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored May 7, 2024
1 parent 881460d commit 0482ffa
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion projects/tui-editor/components/editor-socket/styles/list.less
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,30 @@ ol:not([data-type]) {
ol:not([data-type]) > li:before {
content: counters(item, '.') '.';
display: block;
margin: 0 0.75rem 0 -1.5rem;
counter-increment: item;
margin: 0 0.75rem 0 -1.5rem;
color: var(--tui-base-05);
vertical-align: top;
float: left;
white-space: nowrap;
}

/* TODO: need more investigate, how refactor for deep details-content */

[data-type='details-content'] ol {
counter-reset: details-item;
}

[data-type='details-content'] ol:not([data-type]) > li:before {
content: counters(details-item, '.') '.';
counter-increment: details-item;
}

[data-type='details-content'] ol [data-type='details-content'] ol {
counter-reset: details-item2;
}

[data-type='details-content'] ol:not([data-type]) > li [data-type='details-content'] ol:not([data-type]) > li:before {
content: counters(details-item2, '.') '.';
counter-increment: details-item2;
}

0 comments on commit 0482ffa

Please sign in to comment.