Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/prose/prose-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,20 @@ A second paragraph now. One that contains [a link to Doist.com](https://doist.co
formatting examples, such as **bold text**, _italic text_, ~~strikethrough text~~ and \`monospace\`.
These can also be combined, like [using _italics_, \`monospace\`, or _\`both\`_ within a link](https://en.wikipedia.org/wiki/Typography).

Now let’s continue with a list:
Now let’s continue with a tight list (no blank lines between items):

- this one
- that one
- the other one

And a loose list (blank lines between items):

- first item

- second item

- third item

And a blockquote:

> Blockquotes are indented and have a border on the left. The text color is slightly dimmed.
Expand Down
6 changes: 6 additions & 0 deletions src/prose/prose.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@
margin-top: calc(0.5 * var(--reactist-prose-space-1));
}

/* Loose lists (blank lines between items) produce <p> inside <li>. Give them paragraph-level
spacing so the visual gap the user intended is preserved. */
.prose li:has(> p) + li {
Comment thread
craigcarlyle marked this conversation as resolved.
margin-top: var(--reactist-prose-space-2);
}

.prose ul ul,
.prose ul ol,
.prose ol ol,
Expand Down
Loading