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:
Cameron Eldridge
2025-09-15 13:28:18 +02:00
committed by Sebastian Martinez
parent 23d608d433
commit e4ec27c06b
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -68,7 +68,7 @@
<style>
svg {
display: flex;
display: inline-flex;
flex-shrink: 0;
}
</style>
+5 -5
View File
@@ -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;
}