makepad/libs/html
Kevin Boos 550f6e3a2f
TextFlow: collapse block margins like CSS in Html; Html: don't draw an inline code box behind each line of <pre><code> (#1297)
* TextFlow: collapse block margins like CSS in `Html`

Block margins were applied right away and stacked, so a message starting or ending
with a block got blank space above or below it, and `<li><p>` put the text a row
below its bullet.
* Add `collapse_block_margins` (on in `Html`, off elsewhere): neighboring margins share
  the larger one, and none are added at the start or end of the flow, list items,
  quotes, code blocks or table cells
* Keep a block that opens right after a list marker on the marker's row
* Only trim html whitespace at line starts, so `&nbsp;` spacers survive

* Html: don't draw an inline code box behind each line of `<pre><code>`

A code block already draws its own background, but the `<code>` inside it
also got an inline code box behind every line. Both used the same color, so
that box only became visible once `code_color` was translucent.

* `TextFlow` tracks whether it's inside a code block (`code_block`)
* `<code>` only pushes `inline_code` when it isn't inside one
2026-10-09 11:00:16 +02:00
..
src TextFlow: collapse block margins like CSS in Html; Html: don't draw an inline code box behind each line of <pre><code> (#1297) 2026-10-09 11:00:16 +02:00
Cargo.toml 1.0.0 2025-05-15 16:46:16 +02:00