Skip to content

Highlight color improvements for lists#7

Open
jondkinney wants to merge 1 commit intomainfrom
highlight-improvements
Open

Highlight color improvements for lists#7
jondkinney wants to merge 1 commit intomainfrom
highlight-improvements

Conversation

@jondkinney
Copy link
Copy Markdown
Member

Summary

  • Clear highlight color on Enter — new paragraphs start with default styling
  • Parent retention: children of uniformly highlighted list items inherit color
  • Bullet marker color sync via ListItemNode transform (::before matches text)
  • Highlight propagation: applying color to parent cascades to nested children
  • Mark padding sync: data-pad-start/data-pad-end on <mark> elements
  • CSS parsing helpers that handle var() values safely in Rollup builds
  • All inheritance functions exported for reuse by other extensions

Test plan

  • Apply highlight color, press Enter — new paragraph has no color
  • Highlight a parent list item, Tab-indent a child — child inherits color
  • Colored text bullet markers (::before) match text color
  • Apply color to parent with nested children — all children update

🤖 Generated with Claude Code

- Clear highlight color on Enter: new paragraphs start with default styling
  unless parent list item is uniformly highlighted (parent retention)
- Bullet marker color sync: ListItemNode transform sets <li> element color
  from text content so ::before markers match via currentColor
- Highlight propagation: applying color to a parent list item cascades to
  all children in the structural wrapper
- Highlight inheritance: Tab-indenting under a highlighted parent inherits
  the parent's color
- Mark padding sync: data-pad-start/data-pad-end attributes on <mark>
  elements for word-boundary-aware padding
- CSS parsing helpers ($extractHighlightFromCSS, $mergeHighlightIntoCSS,
  $removeHighlightFromCSS) that handle var() values safely in Rollup builds
- All inheritance functions exported for reuse by other extensions

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.

1 participant