Skip to content

style(codeblocks): align all copy buttons to the top-right - #742

Merged
michaelpporter merged 1 commit into
mainfrom
align-codeblock-buttons
Jul 25, 2026
Merged

style(codeblocks): align all copy buttons to the top-right#742
michaelpporter merged 1 commit into
mainfrom
align-codeblock-buttons

Conversation

@michaelpporter

Copy link
Copy Markdown
Owner

Follow-up to #740. That PR unified the mechanism the three codeblocks use to position their buttons, but left mermaid and markmap visually top-left while the tree moved to top-right — so the look still wasn't unified.

Change

Codeblock Before After
Tree top-2 right-2 unchanged
Mermaid left-2 top-2 top-2 right-2
Markmap (copy) left-2 top-2 top-2 right-2
Markmap (zoom/fit toolbar) bottom-2 right-2 unchanged

Top-right also matches Obsidian's own convention for code blocks.

Only the copy buttons move. The markmap toolbar stays bottom-right — separate control group, no collision with the copy button now above it.

left-2 is no longer used anywhere in the plugin (verified: 0 occurrences in the compiled styles.css).

bun run build && bun run test pass (379 tests, 0 type errors, svelte-check 0/0).

The mermaid and markmap copy buttons sat top-left while the tree's sat
top-right, so the three codeblocks disagreed on placement. Top-right
matches Obsidian's own convention for code blocks.

Only the copy buttons move. The markmap zoom/fit toolbar stays in the
bottom-right — it's a separate control group and doesn't collide.
@michaelpporter
michaelpporter merged commit 7592848 into main Jul 25, 2026
1 check passed
@michaelpporter
michaelpporter deleted the align-codeblock-buttons branch July 25, 2026 17:15
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