From 239565ea2048e92a34466f6110ba5dd86a5c1a2c Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 14 Jun 2026 13:51:46 +0200 Subject: [PATCH] refactor(timeline): single-source the spine X position via --spine-x The spine offset (0.5rem phone / 50% desktop) was hard-coded in both TimelineView's .timeline-axis::before and YearBand's .year-node/.letter-dot, kept in sync only by a comment. Declare --spine-x once on .timeline-axis and have the markers consume it by inheritance, so a change to the spine position moves the markers with it. Add a test that the year-node tracks the token. Co-Authored-By: Claude Opus 4.8 --- frontend/src/lib/timeline/TimelineView.svelte | 12 +++++++++--- frontend/src/lib/timeline/YearBand.svelte | 16 ++++++++-------- .../src/lib/timeline/YearBand.svelte.spec.ts | 19 +++++++++++++++++++ 3 files changed, 36 insertions(+), 11 deletions(-) diff --git a/frontend/src/lib/timeline/TimelineView.svelte b/frontend/src/lib/timeline/TimelineView.svelte index 2820f6d0..a82a112a 100644 --- a/frontend/src/lib/timeline/TimelineView.svelte +++ b/frontend/src/lib/timeline/TimelineView.svelte @@ -92,8 +92,12 @@ const isEmpty = $derived(timeline.years.length === 0 && timeline.undated.length