Fix nested task lists (#517) (#855)

Fix #517

Users expect nested task lists to have the same indentation as other lists.
Fix the styling in `_sass/content.scss` to do that.
Add examples in `docs/index-test.md` to test.
This commit is contained in:
Peter Mosses 2022-07-04 21:24:31 +02:00 committed by GitHub
parent c68a19b906
commit d083aeb3fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 7 deletions

View File

@ -82,14 +82,7 @@
}
}
.task-list {
padding-left: 0;
}
.task-list-item {
display: flex;
align-items: center;
&::before {
content: "";
}
@ -97,6 +90,8 @@
.task-list-item-checkbox {
margin-right: 0.6em;
margin-left: -1.4em;
// The same margin-left is used above for ul > li::before
}
hr + * {

View File

@ -152,6 +152,30 @@ Some text
- [ ] Hello, this is another TODO item
- [x] Goodbye, this item is done
### Nesting task lists
- [ ] level 1 item (task)
- [ ] level 2 item (task)
- [ ] level 2 item (task)
- [ ] level 1 item (task)
- [ ] level 1 item (task)
### Nesting a ul in a task list
- [ ] level 1 item (task)
- level 2 item (ul)
- level 2 item (ul)
- [ ] level 1 item (task)
- [ ] level 1 item (task)
### Nesting a task list in a ul
- level 1 item (ul)
- [ ] level 2 item (task)
- [ ] level 2 item (task)
- level 1 item (ul)
- level 1 item (ul)
### Small image
![](../../assets/images/small-image.jpg)