fix(timeline): keep the axis spine behind the in-flow content (REQ-006)

The absolutely-positioned spine ::before painted above the in-flow centered
content (density strips, event pills), drawing the line through them. Give
.timeline-axis a stacking context and the spine z-index:-1 so the line is
always background; cards, pills, strips, dots and badges ride on top.

Refs #833
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-06-14 11:38:32 +02:00
parent 217508ddb2
commit 8029bdec92
2 changed files with 13 additions and 1 deletions

View File

@@ -254,10 +254,13 @@ describe('TimelineView', () => {
});
const axis = document.querySelector('.timeline-axis') as HTMLElement;
expect(axis).not.toBeNull();
const bg = getComputedStyle(axis, '::before').backgroundImage;
const before = getComputedStyle(axis, '::before');
const bg = before.backgroundImage;
expect(bg).toContain('gradient');
// three colour stops: mint, navy, slate
expect((bg.match(/rgb/g) ?? []).length).toBe(3);
// the spine is always background: behind the in-flow cards/pills/strips.
expect(before.zIndex).toBe('-1');
} finally {
root.style.removeProperty('--palette-mint');
root.style.removeProperty('--palette-navy');