Skip to content

fix(html): one text-decoration declaration for a run with two lines - #894

Merged
andiwand merged 2 commits into
mainfrom
fix/text-decoration-one-declaration
Sep 13, 2026
Merged

andiwand merged 2 commits into
mainfrom
fix/text-decoration-one-declaration

Conversation

@andiwand

@andiwand andiwand commented Sep 13, 2026

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Stacked on #893, step 1 of the inline formatting plan.

translate_text_style wrote text-decoration:underline; and then text-decoration:line-through;. In css the second declaration replaces the first, so a run that is both underlined and struck through showed one line. The two now share one declaration, text-decoration:underline line-through;.

The editor that lands later in this stack writes the css the renderer writes (decision 15 of docs/design/document-editing.md), so the renderer had to write it right first.

No reference page holds both lines on one run, so no reference output changes. Three tests on translate_text_style pin the three shapes. Changelog entry added.

andiwand and others added 2 commits September 13, 2026 17:18
The editing plans named inline formatting as the one open step and held one
sketch for it, `setMark {ids, mark, on}`, over four properties. The sketch
does not carry colour or size, because they are values and not toggles.

The document editing plan now has the section for it: seven properties and
where each format keeps them, the op `setTextStyle {id, style}`, decisions
8 to 16, the adapter surface, four steps of work and the open questions.
Two facts from the code shape it. A run shares its style container with its
siblings in all three writing engines, so a mark first gives the run a
container of its own. The renderer writes two `text-decoration`
declarations for a run that is both underlined and struck through, and the
second wins.

Formatting sits behind the editing scope: `paragraph` refuses it, and only
`document` takes it. The highlight question in editing.md is answered.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137vd79NGaB8nfLsdPoghM4
`translate_text_style` wrote `text-decoration:underline;` and then
`text-decoration:line-through;`, so a run that is both underlined and struck
through showed one line, because the second declaration replaces the first.
The two now share one declaration. No reference page holds both lines on one
run, so no reference output changes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137vd79NGaB8nfLsdPoghM4
Base automatically changed from docs/formatting-plan to main September 13, 2026 16:26
@andiwand
andiwand merged commit bd13639 into main Sep 13, 2026
36 checks passed
@andiwand
andiwand deleted the fix/text-decoration-one-declaration branch September 13, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant