Skip to content

Give corner marks and toolbar marks one face and one size - #3978

Merged
max-sixty merged 6 commits into
mainfrom
agent-a9b36e8731a096992
Oct 25, 2026
Merged

max-sixty merged 6 commits into
mainfrom
agent-a9b36e8731a096992

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Leaf had two styles for one kind of small icon press. Corner marks (the floating panel's fold, an attachment's ×, a drawing's Undo last stroke and Remove drawing) were 20px with 12px icons in the dim ink, which the user chose on 22 October (#3606). Toolbar marks were different: a draft's Edit, Save and Discard, and every Copy on a code block, an lf-code listing and the playground's instruction. They were 26px, or the block's line height for a lone Copy, with 16px icons, the muted ink and a chip wash under the pointer. The user chose one style for both.

.lf-mark in browser/styles/components/controls.css is now the one home for a mark's size (--mark-size, 20px), icon (12px), ink, hover (full ink), focus ring and reach. Each seat keeps only its place and its ground:

  • .lf-corner-mark adds the absolute seat, a patch of the ground with its ring and lift, and the forced-colours edge.
  • .lf-mark-bar (integration.css) is the pill on a border.

Copy, a Web Awesome control, wears the face on its button part.

Size. The shared size is 20px, the corner marks' size from the 22 October decision. A toolbar mark works at that size: the pill is 24px tall instead of 30px, and its icons are the corner marks' 12px.

Behaviour changes

  • A code block's Copy no longer follows the block's line height, and --lf-code-copy-size is gone (both came from fix: size code Copy buttons to their blocks #3830). Every Copy is 20px. That also covers what fix: size code Copy buttons to their blocks #3830 fixed, a 32px Copy on a 19px line. page-authoring.md drops its line about the property, and the compact-line test now checks that Copy is the mark's size on a compact block and on a tall one.
  • A toolbar spaces its marks so their reaches meet without overlapping (gap: max(2px, aim floor − mark)). That gap is 4px with a mouse and 24px under a finger. A finger's draft marks used to be 44px-wide faces. They are now 20px faces, each with a 44px reach.
  • Every mark's focus ring now lies on the mark's own edge. It used to stand 2px out on a corner mark, inside a draft's marks, and 3px out on a lone Copy.
  • A toolbar mark under the pointer no longer gets a chip wash. Its icon goes to full ink, as a corner mark's does.
  • Every copy control now draws Leaf's icons. copyControl slots icons.js's copy, check and cross icons, and icons.js gains a copy icon. Web Awesome's glyphs fill their box, so at the shared size Copy had stood larger than the pencil beside it. This also reaches the heading link, which passes icon: "link" instead of slotting its own, and the panel's copy presses and About rows, which now draw the 16px Leaf copy icon like the panel's other icons.

Deleted: --corner-mark, --lf-draft-mark, --lf-code-copy-size, the draft's own mark size and ring rules, the Copy part's size and padding arithmetic, and copySize/setCopySize in code-copy.js. The draft's marks drop lf-btn lf-quiet-action lf-draft-action. leaf-dev stills gains release-draft-hover and native-code-copy-hover.

Checked

  • Chromium stills against main. The fold, an attachment's × and a drawing's marks on hover are pixel-identical in light and dark. The draft toolbar, code Copy, keyboard focus and the phone draft toolbar changed as described.
  • Firefox: the draft's marks compute the same 20px faces, 12px icons, ink and radius. Keyboard focus on a draft mark (dark) and on the drawing's Undo draws the ring on the mark's edge.
  • Under a finger, a draft's marks have 44px reaches that meet without overlapping.
  • 46 focused browser tests on drafts, copy, the attachment shelf, the drawing, the panel fold and heading links pass. pnpm run test:runtime, pnpm run check:browser and tests/model/test_interact_layer.py pass.

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

max-sixty and others added 4 commits October 25, 2026 09:02
Leaf had two styles for the same kind of small icon press. Corner marks
(the floating panel's fold, an attachment's ×, a drawing's Undo last
stroke and Remove drawing) were 20px with 12px icons in the dim ink.
Toolbar marks (a draft's Edit, Save and Discard, and every Copy on a
code block, an `lf-code` listing and the playground's instruction) were
26px, or the code block's line height for a lone Copy, with 16px icons
in the muted ink and a chip wash under the pointer. The user chose one
style for both.

`.lf-mark` in `browser/styles/components/controls.css` is now the one
home for a mark's size (`--mark-size`, 20px), icon (12px), ink, hover
(full ink), focus ring and reach. Each seat keeps only its place and
its ground: `.lf-corner-mark` adds the absolute seat, the ground patch,
its ring and lift, and the forced-colours edge; `.lf-mark-bar`
(integration.css) is the pill on a border. Copy wears the face on its
Web Awesome button part.

The size is the corner marks' 20px, from the face the user chose on 22
October (#3606), since a toolbar mark works at it: the toolbar's pill is
24px tall instead of 30px, and its icons are the corner marks' 12px.

Behaviour changes:

- A code block's Copy no longer follows the block's line height, and
  `--lf-code-copy-size` is gone (#3830 added both). Every Copy is 20px,
  which also covers the compact-code case #3830 fixed, where Copy had
  been 32px on a 19px line. `page-authoring.md` drops the line about it,
  and `test_code_copy_face_follows_a_compact_source_line` becomes
  `test_code_copy_is_a_mark_whatever_its_block_s_line`.
- A toolbar spaces its marks so their reaches meet without overlapping
  (`gap: max(2px, aim floor - mark)`): 4px with a mouse and 24px under a
  finger. Under a finger a draft's marks used to be 44px wide faces.
  They are now 20px faces, each with a 44px reach.
- The focus ring of every mark now lies on the mark's own edge
  (`outline-offset: 0`). It used to stand 2px out on a corner mark,
  inside a draft's marks, and 3px out on a lone Copy.
- A toolbar mark under the pointer no longer gets a chip wash. Its icon
  goes to full ink, as a corner mark's does.

Deleted: `--corner-mark`, `--lf-draft-mark`, `--lf-code-copy-size`, the
draft's own mark size and ring rules, the Copy part's size and padding
arithmetic, and `copySize`/`setCopySize` in `code-copy.js`. The draft's
marks drop `lf-btn lf-quiet-action lf-draft-action`. `leaf-dev stills`
gains `release-draft-hover` and `native-code-copy-hover`.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Web Awesome's copy, check and cross glyphs fill their box, so at the
mark's one icon size Copy stood larger than the pencil beside it. The
code block's Copy now slots icons.js's copy, check and cross, and
icons.js gains a copy icon.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
copyControl now slots Leaf's copy, check and cross icons itself, with
the rest icon its caller names (`icon`), so the code block's Copy, the
heading link and the panel's copy presses draw one vocabulary. The
panel's About rows draw icons.js's copy too.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 25, 2026
leaf-agent
leaf-agent previously approved these changes Oct 25, 2026
@max-sixty
max-sixty merged commit aa339ff into main Oct 25, 2026
4 checks passed
@max-sixty
max-sixty deleted the agent-a9b36e8731a096992 branch October 25, 2026 17:01
max-sixty added a commit that referenced this pull request Oct 25, 2026
max-sixty added a commit that referenced this pull request Oct 26, 2026
Every copy control draws icons.js's `copy` icon (`copyControl`), which
#3978 added. It drew the front sheet at the bottom left, the shape of a
window's Restore button, and the user didn't recognise the playground
instruction's Copy as a copy symbol. The icon now has the common shape,
as Lucide, Feather, Material and Heroicons draw it: the front sheet at
the bottom right, with the 1.25 corner radius the set's other icons use.

Every Copy changes with it: code blocks, `lf-code`, a draft's Markdown,
the playground's instruction and the floating panel's copy rows.
`leaf-dev stills main` shows only the glyph changing in
`native-code-copy-hover`, `release-draft-hover` and
`walkthrough-copy-hover`.

> _This was written by Claude Code on behalf of max-sixty_

Co-authored-by: Claude Opus 5.5 (1M context) <[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