Skip to content

Name three elevations and share the faces chrome spelled twice - #2981

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

max-sixty merged 3 commits into
mainfrom
agent-a3542aa8b27a6b7e5

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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.css states 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.
  • The skip link, comment note and picture proxy share one focused-chip rule (chrome.css); More's two menus share their placement and scroll rule, and those menus and the status detail share one card face; .lf-shaped is one rule for the aim, the target trace and the visual mark (!important on its three declarations, since placement writes the radius inline and the visual mark's own rule sits in a later sheet).
  • .lf-unseen and .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 (formerly test_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 spells 0 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):

  • Pins and raised margin entries (alert-queue, side-tab-focus, playground-text/-controls/-choice, progress-callout, plan-card-beside, triage-composer-sent and its dark, beside and touch variants, gallery-ask-figure-900/-phone, margin-gallery-phone, release-draft and -phone, gallery-wide-schedule; light and dark): the pin's two-layer shadow 0 1px 2px, 0 3px 8px becomes --raise-1, losing its tight contact edge, so the pin reads slightly softer. The ✓/✗ action entries move from 0 3px 6px to 0 2px 8px under the same hairline. About 2,500 px per state at 2x, all at the pin's or entry's edge.
  • Command reference (light and dark): 0 12px 32px becomes 0 12px 36px, a low-contrast difference at the dialog's lower edge.
  • Unchanged where they were already at a height: More's menu, the versions menu, the status detail, the skip link and proxy chips, page search, the thread card, the media viewer's image and the board's held card. Probes of the focused skip link and proxy and of the three banner panels return the same computed position, size, border, background and shadow on both arms. The skip link alone gains max-width: calc(100vw - 16px), which doesn't bind at its length.
  • The catalogue doesn't capture these, so they change unseen there: the page map (0 18px 54px to --raise-3), the reaction palette (0 4px 12px to --raise-2), the gloss (0 10px 28px to --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-1 and --raise-1), lf-shot's comparison handle (0 1px 3px to --raise-1) and the options hover lift (0 3px 10px to --raise-1). A side-by-side screenshot of the floating panel's open menu shows no difference you can see at 1x.
  • Noise that differs between any two runs: the transient "14 agent messages" notice (banner-more, retained-quote, image-preview), share-link and plan-more (a per-run token and hash), walkthrough-copy-keyboard (scroll position), drawing-photo-comment. diff-file-resolved and diff-file-resolved-closed time out on both arms.

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.

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

max-sixty and others added 3 commits October 14, 2026 21:36
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
@max-sixty
max-sixty merged commit a774e89 into main Oct 15, 2026
3 checks passed
@max-sixty
max-sixty deleted the agent-a3542aa8b27a6b7e5 branch October 15, 2026 05:44
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]>
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