Repository navigation
Name the tooltip face once and cast drop-shadows at the raise heights - #2986
Merged
Merged
Conversation
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]>
leaf-agent
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 7pxpadding,4pxradius, ink ground, paper ink,500 var(--t-6)/1.2sans and--raise-1. Three of them are::afterpseudo-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-rand--tip-font. Each site names them and keeps its own placement.--tip-fontderives from the type ladder, which resolves where it is declared, so.density-workingdeclares 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 whatdrop-shadow()accepts, sofilter: 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.0 2px 4pxto--raise-1: they stand just off the passage they answer, and it is the nearest height.0 12px 14pxat 70% of--shade, plus0 1px 1pxat 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 stillsagainst main on the ten states that show these surfaces..density-workingthe 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.