Skip to content

Commit

Permalink
fix: prose nested lists (#529)
Browse files Browse the repository at this point in the history
* fix: prose nested lists

* cleanup
  • Loading branch information
bdrtsky authored Jun 30, 2021
1 parent 4bf9817 commit 843f796
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 37 deletions.
4 changes: 2 additions & 2 deletions src/defaultTheme/components/atoms/prose/ProseLi.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ li {
}
}
ul li {
ul > li {
&::before {
@apply absolute left-0 top-[0.5em] d-prose-ul-li-bullet rounded-full w-1.5 h-1.5;
content: '';
}
}
ol li {
ol > li {
&::before {
@apply absolute left-0 top-0 d-secondary-text;
content: counter(list-item, decimal) '.';
Expand Down
35 changes: 3 additions & 32 deletions src/defaultTheme/components/atoms/prose/ProseOl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,11 @@
</template>

<style lang="postcss" scoped>
/* TODO: move prose plugin sources */
ol[type='A'] {
--list-counter-style: upper-alpha;
}
ol[type='a'] {
--list-counter-style: lower-alpha;
}
ol[type='A s'] {
--list-counter-style: upper-alpha;
}
ol[type='a s'] {
--list-counter-style: lower-alpha;
}
ol[type='I'] {
--list-counter-style: upper-roman;
}
ol[type='i'] {
--list-counter-style: lower-roman;
}
ol[type='I s'] {
--list-counter-style: upper-roman;
}
ol[type='i s'] {
--list-counter-style: lower-roman;
}
ol[type='1'] {
--list-counter-style: decimal;
}
ol {
@apply mx-0 p-0 my-[1.25em] list-none;
ul,
ol {
@apply my-[0.5em];
>>> ul,
>>> ol {
@apply !my-[0.5em];
}
}
</style>
6 changes: 3 additions & 3 deletions src/defaultTheme/components/atoms/prose/ProseUl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<style lang="postcss" scoped>
ul {
@apply list-none mx-0 p-0 my-[1.25em];
ul,
ol {
@apply my-[0.5em];
>>> ul,
>>> ol {
@apply !my-[0.5em];
}
}
</style>

0 comments on commit 843f796

Please sign in to comment.