Skip to content

Name the tooltip face once and cast drop-shadows at the raise heights - #2986

Merged
max-sixty merged 2 commits into
mainfrom
agent-a3542aa8b27a6b7e5
Oct 15, 2026
Merged

max-sixty merged 2 commits into
mainfrom
agent-a3542aa8b27a6b7e5

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Follow-up to #2981, which left two faces spelled out per site: the tooltip chip a control's label wears, and the two elevations written as filter: drop-shadow().

Tooltip face. The margin entry's label, a reaction's held word, lf-shot's outline count and lf-diff's cut path each wrote the same inverse chip: 4px 7px padding, 4px radius, ink ground, paper ink, 500 var(--t-6)/1.2 sans and --raise-1. Three of them are ::after pseudo-elements, two live in packages, and two render in shadow trees, so no shared class or rule reaches all four. Custom properties inherit into every tree, so the theme now states the face as tokens beside the raise heights: --tip-bg, --tip-ink, --tip-pad, --tip-r and --tip-font. Each site names them and keeps its own placement. --tip-font derives from the type ladder, which resolves where it is declared, so .density-working declares it again beside --lf-key-badge-size. That is the theme's existing pattern for ladder-derived tokens. lf-diff's tooltip shows a file path and keeps the mono face it inherits, so it takes every token but --tip-font.

Drop-shadows. Each --raise-* is one layer with no spread, which is exactly what drop-shadow() accepts, so filter: drop-shadow(var(--raise-N)) reads the scale as it stands. I chose this over splitting the tokens into offset and blur parts, or a parallel --drop-* set, because it adds no tokens and leaves one value per height. The cost is that a height can never gain a second layer or a spread: drop-shadow() would reject it, and the two filters would silently draw no shadow. The theme comment beside the tokens states that constraint.

  • The response bar and page comment card go from 0 2px 4px to --raise-1: they stand just off the passage they answer, and it is the nearest height.
  • The floating panel's ground goes from two diluted layers (0 12px 14px at 70% of --shade, plus 0 1px 1px at 30%) to --raise-2, the height of what opens over the page.

The elevation test now reads a filter's drop-shadow() arguments as well as box-shadows and custom properties. I checked that it fails when the response bar's filter spells its own shadow again.

What changes on screen. I ran leaf-dev stills against main on the ten states that show these surfaces.

  • The floating panel (floating-thread, floating-thread-retitled): its shadow is wider and softer at the sides and slightly shallower below. This is the largest difference.
  • The page comment card and the anchored response bar (plan-page-comment-resting, its dark variant and plan-page-comment-long; triage-composer and triage-composer-resting, light and dark): the shadow is a little wider and softer. In dark it is barely visible.
  • The tooltips are unchanged. A probe returns the same computed padding, radius, colours, font and shadow for the margin label and the reaction tooltip on both arms. Under .density-working the label is still 10.5px.

Size. git diff --numstat origin/main: +83 −45 in all. The hand-written stylesheets are +28 −15 (the tokens and their comment), and the test is +28 −9; the rest is generated sheets.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 2 commits October 14, 2026 22:50
A control's label (the margin entry's, a reaction's, lf-shot's outline count,
lf-diff's cut path) spelled the same inverse chip four times, on elements and
pseudo-elements in the document, in packages and in shadow trees, where no
shared rule reaches. The theme now states the face as --tip-* tokens beside
the raise heights, which custom properties carry into every tree; each site
names them and keeps its own placement. --tip-font derives from the type
ladder, so .density-working declares it again. lf-diff keeps its path in
mono and takes no --tip-font.

The two filter elevations now read the scale directly, since each --raise-*
is one layer with no spread and drop-shadow() takes it as it stands: the
response bar and page comment card at --raise-1 (from 0 2px 4px), the
floating panel's ground at --raise-2 (from two diluted layers, 0 12px 14px
at 70% and 0 1px 1px at 30% of --shade). The elevation test now reads
filters' drop-shadow() arguments too.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit a4a8aef into main Oct 15, 2026
3 checks passed
@max-sixty
max-sixty deleted the agent-a3542aa8b27a6b7e5 branch October 15, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants