From 563c9c29b0907fb7976fa744b84f3bf80d0e8799 Mon Sep 17 00:00:00 2001 From: Michael Porter Date: Sat, 25 Jul 2026 11:33:15 -0400 Subject: [PATCH] fix(codeblock-tree): float the copy button in the top-right corner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The button asked for `absolute bottom-2 right-2`, but src/styles.css imports only `tailwindcss/utilities` — in Tailwind v4 the numeric spacing scale lives in the theme layer, so `bottom-2`, `right-2` and the `pr-10` content padding all compiled to nothing. An absolutely positioned element with no insets sits at its static position, putting the button over the first row's collapse arrow. Positions the button (and the row padding that keeps note flair clear of it) with plain CSS against Obsidian's --size-4-* variables, so it no longer depends on the missing Tailwind scale. Scoped to the tree codeblock. The wider problem — 99 spacing utilities across 15 files silently compiling to nothing — is left untouched here. Refs #736 --- CHANGELOG.md | 1 + .../codeblocks/CodeblockTree.svelte | 6 ++--- src/styles.css | 22 +++++++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ea6706f..06981734 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +* The tree codeblock's copy button now floats in the top-right corner ([#736](https://github.com/michaelpporter/breadcrumbs/issues/736)). It was rendering over the first row's collapse arrow: the button is positioned with Tailwind utilities, but this plugin imports only Tailwind's utilities layer, so the numeric spacing scale it needs is unavailable and the offsets compiled to nothing — leaving the button at its static top-left position. Its placement (and the row padding that keeps note flair clear of it) is now written as plain CSS against Obsidian's own size variables. * Links with a block or heading reference now point at the note itself ([#734](https://github.com/michaelpporter/breadcrumbs/issues/734)). `down:: [[2#^71f2d9]]` in `1.md` used to create an edge to a phantom `2#^71f2d9.md` node, so `1.md`'s tree looked right while `2.md` never showed `1.md` as its parent. The subpath is now stripped before resolving, for both frontmatter and inline fields and in list notes, and regardless of which folders the notes live in. A subpath-only link (`[[#^71f2d9]]`, pointing inside the same note) creates no edge. * Inline Dataview fields no longer claim links that sit outside them ([#731](https://github.com/michaelpporter/breadcrumbs/issues/731)). `(down:: [[y]]) [[x]]` in `x.md` used to make **both** `[[y]]` and `[[x]]` `down` children — including a self-loop from the note to itself — because the builder attributed every link on a line to whichever field opened that line. Bracketed fields now end at their closing bracket, matching Dataview, so only `[[y]]` becomes an edge and links elsewhere on the line stay ordinary prose. Multiple fields on one line (`(up:: [[p]]) (down:: [[c]])`) are also parsed separately now. Bare line-level fields (`down:: [[y]], [[x]]`) are unchanged — their value is still the rest of the line. diff --git a/src/components/codeblocks/CodeblockTree.svelte b/src/components/codeblocks/CodeblockTree.svelte index fc9851e9..4e4972a3 100644 --- a/src/components/codeblocks/CodeblockTree.svelte +++ b/src/components/codeblocks/CodeblockTree.svelte @@ -120,8 +120,8 @@ {/if} {#if data && !data.is_empty()} -
-
+
+
@@ -141,7 +141,7 @@
-
+