mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-19 05:10:41 +08:00
Fix CSS for task lists in rendered Markdown
The previous CSS was setting the task-list element to be `display: flex`, but this
does not play well with a task list item that contains further nodes. Commonly,
a sub-list, but even a bolded bit of text is rendered with a bit of unpleasant
extra spacing.
Example:
- [ ] Task 1
- Step 1: Do *thing*
- Step 2: Do __another__ thing
Or since I'm not sure if that's going to be rendered via this interface,
just find such a file on the hosted version. [This](https://app.radicle.xyz/nodes/seed.radicle.garden/rad%3Az28AWjUMmH9kFFCw7W9GMSCHoA9zZ)
repository of mine is particularly offensive in this category.
To solve the issue, I have removed the flex, and additional turned the icon component
itself into an inline flex element, as it being a block element was likely part of
the reason the list became a flex container to begin with.
This commit is contained in:
committed by
Sebastian Martinez
parent
23d608d433
commit
e4ec27c06b
@@ -68,7 +68,7 @@
|
||||
|
||||
<style>
|
||||
svg {
|
||||
display: flex;
|
||||
display: inline-flex;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -347,12 +347,13 @@
|
||||
}
|
||||
|
||||
.markdown :global(li.task-item) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
margin-left: -1.2rem;
|
||||
list-style-type: none;
|
||||
color: var(--color-foreground-dim);
|
||||
}
|
||||
.markdown :global(li.task-item radicle-icon-small) {
|
||||
margin-right: 0.2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.markdown :global(li.task-item:not(:last-child)) {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
@@ -460,7 +461,6 @@
|
||||
|
||||
.markdown :global(ul) {
|
||||
line-height: 1.625;
|
||||
list-style-type: inherit;
|
||||
padding-left: 1.25rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user