Skip to content

Fix highlighter toolbar icon alignment on CSS-hostile pages#711

Open
clehene wants to merge 2 commits intoobsidianmd:mainfrom
clehene:codex/fix-toolbar-svg-offset
Open

Fix highlighter toolbar icon alignment on CSS-hostile pages#711
clehene wants to merge 2 commits intoobsidianmd:mainfrom
clehene:codex/fix-toolbar-svg-offset

Conversation

@clehene
Copy link
Copy Markdown

@clehene clehene commented Feb 26, 2026

Summary

Reset toolbar button SVG layout styles so host-page global SVG CSS cannot push icons out of their button bounds.

What changed

  • Hardened .obsidian-highlighter-menu button svg styles in src/highlighter.scss.
  • Added before/after evidence screenshots under .github/assets/toolbar-svg-offset/.

Validation

  • Built chrome bundle.
  • Reproduced on nLab with one highlight.
  • Before: SVG computed margins were 40px/10px and icons rendered below controls.
  • After: SVG margins are 0/0 and icons are centered.

Fixed screenshot

Fixed toolbar icon alignment

Fixes #710

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.

Highlighter toolbar icons can be displaced by host page SVG CSS

1 participant