Pedigree: connector lines + correct 4-grandparent structure
Rebuilds the family view's pedigree as a recursive bracket chart with CSS connector lines — focus links to its two parents (2 lines), and each parent links to its two parents (4 lines to grandparents). Fixes the prior ambiguity where grandparent slots weren't tied to a specific parent: now every parent shows its own two parent slots, so a person clearly has up to four grandparents grouped by lineage. Height-robust connectors (each leaf draws its own spine half + stub). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Justin Paul <justin@jpaul.me>
This commit is contained in:
@@ -54,3 +54,55 @@ h3,
|
||||
::selection {
|
||||
background: color-mix(in srgb, var(--color-bronze) 22%, transparent);
|
||||
}
|
||||
|
||||
/* Pedigree bracket connectors (ancestors grow rightward). Each leaf draws its
|
||||
own half of the vertical spine + a horizontal stub, so lines stay correct
|
||||
regardless of box heights: focus → 2 parents, each parent → 2 grandparents. */
|
||||
.ped-person {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.ped-self {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.ped-branch {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
margin-left: 2.5rem;
|
||||
}
|
||||
.ped-branch::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: -2.5rem;
|
||||
top: 50%;
|
||||
width: 2.5rem;
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
.ped-leaf {
|
||||
position: relative;
|
||||
padding-left: 1.5rem;
|
||||
}
|
||||
.ped-leaf::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
width: 1.5rem;
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
.ped-leaf::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
border-left: 1px solid var(--border);
|
||||
}
|
||||
.ped-leaf:first-child::after {
|
||||
top: 50%;
|
||||
}
|
||||
.ped-leaf:last-child::after {
|
||||
bottom: 50%;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user