Repository navigation
Name three elevations and share the faces chrome spelled twice - #2981
Merged
Merged
Conversation
Twenty lifts across the layer and its bundled packages wrote nine geometries between them, and several chrome faces were spelled out once per box that wore them. The theme now states three heights beside --shade (--raise-1 resting, --raise-2 opened over the page, --raise-3 a dialog or the thread card), and every lift names one, with a hairline or ring beside it where its edge needs one. The skip link and picture proxy share one focused-chip rule; More's two menus and the status detail share their card face; .lf-shaped is one rule; the composer's quote and On's title wear .lf-quiet instead of restating it. Behavior changed: shadows that sat between the heights move to the nearest one (pins, margin actions, the reaction palette, the gloss, the command reference, the page map, the floating panel's menu, peek and new-reply press, lf-shot's handle, the options hover lift). The elevation test now holds that only the --raise-* tokens spell a blur, in place of counting literal shadows that name --shade. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/assets/runtime/chrome.css # skills/leaf/assets/styles/chrome.css # skills/leaf/kernel/kernel.json
# Conflicts: # skills/leaf/kernel/kernel.json
leaf-agent
approved these changes
Oct 15, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 15, 2026
…#2986) 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_ Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
added a commit
that referenced
this pull request
Oct 15, 2026
Declare `lf-visual-action` in the chrome sheet's shared-class vocabulary. #2981 deliberately gave the page-mounted visual-action chip the same focused face as the skip link, using a rule outside `@scope (.lf-chrome)`. The class was omitted from `chromeSharedClasses`, so the browser scope gate reported a supposedly private chrome rule reaching page content. The rule's reach is intentional; this change records that contract and rebuilds the vendored kernel. Verification: the previously failing `test_a_coined_class_cannot_reach_the_chromes_rules` passes; all 494 runtime tests pass; `pnpm run check:browser` and `git diff --check` pass. Co-authored-by: leaf-agent <[email protected]>
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.
Twenty-nine elevation
box-shadows across the layer's stylesheets and the bundled packages wrote fourteen geometries between them (0 8px 24px var(--shade)nine times), and several chrome faces were spelled out once per box that wore them. This replaces them with three theme tokens and one shared rule per repeated face.What replaces it
styles/theme.cssstates three heights beside--shade:--raise-1(0 2px 8px, a box on the page or just off it: images, pins, pressable margin entries, a control's label, a card lifted under the pointer),--raise-2(0 8px 24px, opened over the page: menus, popovers, the focused chip under the banner, a card in the hand),--raise-3(0 12px 36px, a surface standing over the page for a task: the command reference, the page map, the thread card). Every lift names one, adding a hairline or ring beside it where its edge needs one. The margin entry's raised face is one local token,--lf-entry-lift, which the action entry, the reaction disclosure and the agent-arrival pulse all read.chrome.css); More's two menus share their placement and scroll rule, and those menus and the status detail share one card face;.lf-shapedis one rule for the aim, the target trace and the visual mark (!importanton its three declarations, since placement writes the radius inline and the visual mark's own rule sits in a later sheet)..lf-unseenand.lf-fp-title[data-unseen]are gone: the composer's quote and On's view title wear.lf-quiet.Rule for future code (
skills/leaf/assets/AGENTS.md, "Visual grammar"): a face used twice is a token or a shared rule, and a rule names it rather than spelling it out.test_every_lift_names_one_of_the_theme_s_heights_cast_in_the_scheme_s_ink(formerlytest_every_shadow_the_layer_lifts_a_box_with_is_cast_in_the_scheme_s_own_ink) now holds that only the--raise-*declarations write a blur in the composed layer, and that they are cast in--shade. I checked that it fails when one site spells0 8px 24px var(--shade)again.What changes on screen. I compared the merge base and this branch with
leaf-dev stills(165 states; 122 unchanged):0 1px 2px, 0 3px 8pxbecomes--raise-1, losing its tight contact edge, so the pin reads slightly softer. The ✓/✗ action entries move from0 3px 6pxto0 2px 8pxunder the same hairline. About 2,500 px per state at 2x, all at the pin's or entry's edge.0 12px 32pxbecomes0 12px 36px, a low-contrast difference at the dialog's lower edge.max-width: calc(100vw - 16px), which doesn't bind at its length.0 18px 54pxto--raise-3), the reaction palette (0 4px 12pxto--raise-2), the gloss (0 10px 28pxto--raise-2), the floating panel's menu, peek and new-reply press (each a ring plus a negative-spread shadow, now the ring plus--raise-2,--raise-1and--raise-1), lf-shot's comparison handle (0 1px 3pxto--raise-1) and the options hover lift (0 3px 10pxto--raise-1). A side-by-side screenshot of the floating panel's open menu shows no difference you can see at 1x.Size.
git diff --numstat origin/main: +183 −233 in all, of which the hand-written stylesheets are +77 −90 and the elevation test +35 −25; the rest is generated sheets and the kernel.