From e4ec27c06b6c057fe27bee06838f03e6f6ade61e Mon Sep 17 00:00:00 2001 From: Cameron Eldridge Date: Tue, 19 Aug 2025 17:25:43 -0400 Subject: [PATCH] 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. --- src/components/Icon.svelte | 2 +- src/components/Markdown.svelte | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Icon.svelte b/src/components/Icon.svelte index 6dbb98346..0a33619b2 100644 --- a/src/components/Icon.svelte +++ b/src/components/Icon.svelte @@ -68,7 +68,7 @@ diff --git a/src/components/Markdown.svelte b/src/components/Markdown.svelte index 8a7e7064b..ca6c3ba34 100644 --- a/src/components/Markdown.svelte +++ b/src/components/Markdown.svelte @@ -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; }