Skip to content

fix(editor): match task list item spacing with bullet and ordered lists#62

Open
sfarestam wants to merge 1 commit intodebuglebowski:mainfrom
sfarestam:fix/milkdown-task-list-spacing
Open

fix(editor): match task list item spacing with bullet and ordered lists#62
sfarestam wants to merge 1 commit intodebuglebowski:mainfrom
sfarestam:fix/milkdown-task-list-spacing

Conversation

@sfarestam
Copy link
Copy Markdown
Contributor

@sfarestam sfarestam commented Apr 7, 2026

Summary

  • Task list items had margin: 0 and line-height: 1.25, while bullet/ordered list items used margin: 0.125em and inherited line-height
  • This caused visible vertical spacing differences between list types
  • Aligned both TipTap and Milkdown task list items to use the same 0.125em margins and inherited line-height

Test plan

  • Create a bullet list, ordered list, and task list in a description
  • Verify vertical spacing between items is consistent across all three list types
  • Verify compact line spacing mode still works correctly for task lists

🤖 Generated with Claude Code

Greptile Summary

This PR aligns vertical spacing for TipTap and Milkdown task list items with bullet and ordered lists by setting margin-top/margin-bottom to 0.125em (up from 0) and removing the hardcoded line-height: 1.25 so it inherits from the parent. The compact-mode (.prose-tight) override retains higher CSS specificity and continues to zero out task list item margins correctly.

Confidence Score: 5/5

Safe to merge — minimal, targeted CSS change with no logic or specificity issues.

All changes are P2 or lower; the margin/line-height alignment is correct, and the compact-mode (.prose-tight) cascade is preserved by higher selector specificity (0,3,0,1 vs 0,2,0,2).

No files require special attention.

Important Files Changed

Filename Overview
packages/apps/app/src/renderer/src/assets/main.css Aligns task list item margins (0 → 0.125em) and removes explicit line-height to match bullet/ordered list spacing; compact-mode specificity preserved

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Task list item rendered] --> B{Is .prose-tight active?}
    B -- No --> C[Apply .ProseMirror ul/li task selector\nmargin: 0.125em, line-height: inherited]
    B -- Yes --> D[.prose-tight .ProseMirror.prose li\nspecificity 0,3,0,1 wins]
    D --> E[margin: 0 — compact mode]
    C --> F[Spacing matches bullet/ordered lists]
Loading

Reviews (1): Last reviewed commit: "fix(editor): match task list item spacin..." | Re-trigger Greptile

Task list items had margin-top/bottom: 0 and a custom line-height: 1.25,
while regular list items used 0.125em margins and inherited line-height.
This caused visible spacing differences between list types.

Align both TipTap and Milkdown task list items to use the same 0.125em
margins and inherited line-height as other list items.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants