Skip to content

Commit

Permalink
fix: improve ul and ol list for nesting
Browse files Browse the repository at this point in the history
Resolves #17
  • Loading branch information
atinux committed Dec 6, 2022
1 parent 56eefbf commit 69d1e4f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .demo/content/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
I often have two or three paragraphs in these list items, too, so the hard part is getting the spacing between the paragraphs, list item heading, and separate list items to all make sense. Pretty tough honestly, you could make a strong argument that you just shouldn't write this way.
- Last item


- test
1. test
2. ok
- test
```ts [filename.ts]
const { data } = useNuxtApp() // This is a super long command that goes over the filename
```
4 changes: 4 additions & 0 deletions components/global/ProseOl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@
css({
ol: {
listStyleType: '{prose.ol.listStyleType}',
padding: '{prose.ol.padding}',
margin: '{prose.ol.margin}',
"& > :deep(li)": {
"&::marker": {
color: '{prose.ol.li.markerColor.light}',
"@dark": {
color: '{prose.ol.li.markerColor.dark}'
}
},
'ul, ol': {
margin: 0
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions components/global/ProseUl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@
css({
ul: {
listStyleType: '{prose.ul.listStyleType}',
padding: '{prose.ul.padding}',
margin: '{prose.ul.margin}',
"& > :deep(li)": {
"&::marker": {
color: '{prose.ul.li.markerColor.light}',
"@dark": {
color: '{prose.ul.li.markerColor.dark}'
}
},
'ul, ol': {
margin: 0
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion tokens.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ export default defineTheme({
ul: {
listStyleType: 'disc',
margin: '{typography.verticalMargin.base} 0',
padding: '0 0 0 21px',
li: {
markerColor: {
light: '{typography.color.secondary.300}',
Expand All @@ -222,6 +223,7 @@ export default defineTheme({
ol: {
listStyleType: 'decimal',
margin: '{typography.verticalMargin.base} 0',
padding: '0 0 0 21px',
li: {
markerColor: {
light: '{typography.color.secondary.500}',
Expand All @@ -231,7 +233,7 @@ export default defineTheme({
},
li: {
margin: '{typography.verticalMargin.sm} 0',
listStylePosition: 'inside'
listStylePosition: 'outside'
},
hr: {
margin: '{typography.verticalMargin.base} 0',
Expand Down

1 comment on commit 69d1e4f

@vercel
Copy link

@vercel vercel bot commented on 69d1e4f Dec 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

typography – ./

typography-nuxtlabs.vercel.app
typography.nuxt.space
typography-git-main-nuxtlabs.vercel.app

Please sign in to comment.