Skip to content

Commit 7893dec

Browse files
lukemeliaclaude
andcommitted
Sit the below-card Adorn label flush with the card's bottom edge
A 1px overlap into the card still read as the tag riding slightly too high. Anchor the flipped-below label's top edge exactly at the card's bottom edge (zero overlap) instead; its z-index keeps it above the selection outline stroke, so it still reads as attached. Verified live (label top == card bottom). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7d7b880 commit 7893dec

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

packages/host/app/modifiers/position-adorn-label.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,12 @@ export function makePositionAdornLabel(
116116
anchorLeftX = cardRect.left - 4;
117117
label.style.maxWidth = 'max-content';
118118
}
119-
// When flipped below, overlap the card by 1px so the flag's wide
120-
// top edge tucks just under the bottom outline stroke and reads as
121-
// attached without sitting too high over the card edge. (A 2px
122-
// overlap rode one pixel too high; anchoring it below the card
123-
// instead left a visible gap under the stroke.)
119+
// When flipped below, sit the flag's top edge flush with the card's
120+
// bottom edge — no overlap into the card (any overlap reads as the tag
121+
// riding too high over the edge), and no gap (its z-index keeps it
122+
// above the selection outline stroke, so it still reads as attached).
124123
let anchorTopY =
125-
side === 'top' ? cardRect.top - labelHeight - 2 : cardRect.bottom - 1;
124+
side === 'top' ? cardRect.top - labelHeight - 2 : cardRect.bottom;
126125

127126
// The label's anchor positions (anchorLeftX, anchorTopY) are in
128127
// viewport coordinates. With `position: absolute`, the inline

0 commit comments

Comments
 (0)