Skip to content

Commit 4df4fa3

Browse files
author
Oussama
committed
fix: remove overlapping annotation cards
1 parent d6d9491 commit 4df4fa3

2 files changed

Lines changed: 16 additions & 11 deletions

File tree

website/src/lib/components/Annotation.svelte

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<g class="annotation" class:strong={emphasis === 'strong'}>
1313
<line x1={x} y1={y} x2={x + dx} y2={y + dy} />
1414
<circle cx={x} cy={y} r="3" />
15-
<foreignObject x={x + dx - 4} y={y + dy - 24} width={width + 8} height="124">
15+
<foreignObject x={x + dx} y={y + dy - 20} {width} height="120">
1616
<div class="note">
1717
{#if value}
1818
<span class="value">{value}</span>
@@ -41,14 +41,19 @@
4141
display: flex;
4242
flex-direction: column;
4343
gap: 0.25rem;
44-
width: fit-content;
45-
max-width: 100%;
46-
padding: 0.125rem 0.25rem 0.25rem;
4744
color: currentColor;
48-
background: color-mix(in srgb, var(--bg-paper) 94%, transparent);
4945
font-family: var(--font-body);
5046
font-size: var(--type-small-size);
5147
line-height: var(--type-small-line);
48+
text-shadow:
49+
-2px -2px 0 var(--bg-paper),
50+
0 -2px 0 var(--bg-paper),
51+
2px -2px 0 var(--bg-paper),
52+
-2px 0 0 var(--bg-paper),
53+
2px 0 0 var(--bg-paper),
54+
-2px 2px 0 var(--bg-paper),
55+
0 2px 0 var(--bg-paper),
56+
2px 2px 0 var(--bg-paper);
5257
}
5358
5459
.value {

website/src/lib/scenes/Scene3Gender.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@
2727
let annotations = $derived([
2828
{
2929
decade: 1910,
30-
dx: -118,
31-
dy: -105,
30+
dx: -140,
31+
dy: -96,
3232
value: '1910s',
3333
label: 'brief opening in the early collection.',
34-
width: 185,
34+
width: 165,
3535
},
3636
{
3737
decade: 1930,
38-
dx: -76,
39-
dy: -78,
38+
dx: 34,
39+
dy: -104,
4040
value: '1930s',
4141
label: 'another spike, then a long plateau.',
42-
width: 190,
42+
width: 170,
4343
},
4444
{
4545
decade: 1990,

0 commit comments

Comments
 (0)