One glass material: every floating pill shares the same translucency and blur #319

Closed
opened 2026-10-14 16:49:58 +00:00 by kayg · 5 comments
Owner

kayg (2026-10-14): "make sure all pills share the same translucency/blur". One shared component and material, everywhere.

Audit, then unify, in the app and the mockup. Everything floating gets one set of glass tokens (tint, blur, saturate, hairline edge, shadow) from @calternal/ui:

  • the bottom bar and its sheets;
  • the card and gallery toolbars;
  • context menus (#317);
  • the sticky header's back and heading pills (#285);
  • the search panel chips and filter buttons;
  • toasts;
  • the Mockup pill (mockup only).

Allowed variation: a denser tint only where text sits on the glass (menus), expressed as one token step, not ad-hoc values.

Readability: the block bar ("Body ▾ → link copy delete ✓") over a bright photo is hard to read on kayg's iPhone (screenshot 22:06). Readability must hold over any photo, through the tint, blur strength and a subtle inner shade, without making it solid.

Evidence: a table of every floating element with its token values before and after, plus screenshots over busy photos at 390 and 1440, light and dark. Done after #287 (flicker), in the same shared glass code.

kayg (2026-10-14): "make sure all pills share the same translucency/blur". One shared component and material, everywhere. **Audit, then unify,** in the app and the mockup. Everything floating gets one set of glass tokens (tint, blur, saturate, hairline edge, shadow) from `@calternal/ui`: - the bottom bar and its sheets; - the card and gallery toolbars; - context menus (#317); - the sticky header's back and heading pills (#285); - the search panel chips and filter buttons; - toasts; - the Mockup pill (mockup only). Allowed variation: a denser tint only where text sits on the glass (menus), expressed as one token step, not ad-hoc values. **Readability:** the block bar ("Body ▾ → link copy delete ✓") over a bright photo is hard to read on kayg's iPhone (screenshot 22:06). Readability must hold over any photo, through the tint, blur strength and a subtle inner shade, without making it solid. **Evidence:** a table of every floating element with its token values before and after, plus screenshots over busy photos at 390 and 1440, light and dark. Done after #287 (flicker), in the same shared glass code.
Author
Owner

kayg (2026-10-14): "define one shared interface; you can use the same translucency/blur level for the tab bar, sheets, context menus and search interface. Let me know what those values look like today. You can merge the features after a performance gate and we can tune these later."

Today's values (packages/ui tokens.css):

  • Floating glass (bar, sheets, menu): light rgb(253 250 245 / 0.40), dark rgb(36 32 28 / 0.42). Filter: light blur(44px) saturate(200%) brightness(1.04), dark blur(44px) saturate(190%) brightness(0.92), with a 1px inner edge.
  • Menu (#317): --glass-float-dense, light 76% / dark 78%, same blur.
  • Panes (places and list): --glass 0.42, --glass-pane 0.56 light / 0.34 dark. Filter: blur(28px) saturate(160%).
  • The search panel has its own values. It should move onto the floating set, with less blur (kayg wants more content visible).

Plan: one set of --float-* tokens (tint, blur, saturate, brightness, edge, shadow), used by the bar, sheets, menus, search panel, card toolbars and header pills, with one denser step for text-heavy surfaces. Values are tuned live later, so one place changes everything.

kayg (2026-10-14): "define one shared interface; you can use the same translucency/blur level for the tab bar, sheets, context menus and search interface. Let me know what those values look like today. You can merge the features after a performance gate and we can tune these later." **Today's values** (packages/ui tokens.css): - **Floating glass** (bar, sheets, menu): light `rgb(253 250 245 / 0.40)`, dark `rgb(36 32 28 / 0.42)`. Filter: light `blur(44px) saturate(200%) brightness(1.04)`, dark `blur(44px) saturate(190%) brightness(0.92)`, with a 1px inner edge. - **Menu (#317):** `--glass-float-dense`, light 76% / dark 78%, same blur. - **Panes** (places and list): `--glass` 0.42, `--glass-pane` 0.56 light / 0.34 dark. Filter: `blur(28px) saturate(160%)`. - **The search panel** has its own values. It should move onto the floating set, with *less* blur (kayg wants more content visible). **Plan:** one set of `--float-*` tokens (tint, blur, saturate, brightness, edge, shadow), used by the bar, sheets, menus, search panel, card toolbars and header pills, with one denser step for text-heavy surfaces. Values are tuned live later, so one place changes everything.
Author
Owner

Proposal from search (#321): one lighter floating material.

kayg wants search "more transparent and less blurry so more content can be seen", and the same material everywhere. So rather than give search a one-off value, I changed the shared floating tokens themselves, in the mockup only (apps/mockup/src/styles/glass.css, PR #330). On the search preview, every floating thing (bar, sheets, menus, search panel and pills) uses these values:

Token Today (tokens.css) Proposed
--glass-float, light rgb(253 250 245 / 0.40) rgb(253 250 245 / 0.30)
--glass-float-filter, light blur(44px) saturate(200%) brightness(1.04) blur(20px) saturate(180%) brightness(1.04)
--glass-float, dark rgb(36 32 28 / 0.42) rgb(36 32 28 / 0.36)
--glass-float-filter, dark blur(44px) saturate(190%) brightness(0.92) blur(20px) saturate(170%) brightness(0.9)

Edge, shadow and reduced transparency are unchanged. If kayg likes it on https://preview.calternal.cloud/search.html#/note/2026-10-13?list=journal&find=1&q=canal, these four lines move into packages/ui/src/styles/tokens.css and the mockup file goes away. Text-heavy menus would then want the one denser step this issue already plans.

1-canal-chromium-1440-light.png 1-canal-chromium-1440-dark.png

**Proposal from search (#321): one lighter floating material.** kayg wants search "more transparent and less blurry so more content can be seen", and the same material everywhere. So rather than give search a one-off value, I changed the shared floating tokens themselves, in the mockup only (`apps/mockup/src/styles/glass.css`, PR #330). On the search preview, every floating thing (bar, sheets, menus, search panel and pills) uses these values: | Token | Today (tokens.css) | Proposed | |---|---|---| | `--glass-float`, light | `rgb(253 250 245 / 0.40)` | `rgb(253 250 245 / 0.30)` | | `--glass-float-filter`, light | `blur(44px) saturate(200%) brightness(1.04)` | `blur(20px) saturate(180%) brightness(1.04)` | | `--glass-float`, dark | `rgb(36 32 28 / 0.42)` | `rgb(36 32 28 / 0.36)` | | `--glass-float-filter`, dark | `blur(44px) saturate(190%) brightness(0.92)` | `blur(20px) saturate(170%) brightness(0.9)` | Edge, shadow and reduced transparency are unchanged. If kayg likes it on https://preview.calternal.cloud/search.html#/note/2026-10-13?list=journal&find=1&q=canal, these four lines move into `packages/ui/src/styles/tokens.css` and the mockup file goes away. Text-heavy menus would then want the one denser step this issue already plans. ![1-canal-chromium-1440-light.png](https://git.kayg.org/attachments/dacc2c50-2460-493c-a678-de0c8169fc99) ![1-canal-chromium-1440-dark.png](https://git.kayg.org/attachments/d98b6556-f010-4bff-a3f1-8d5995afdc09)
Author
Owner

kayg, 2026-10-15: build the shared translucent material as ONE component and take it to production. It covers the search interface, context menus, the tab bar, the block format bar, the block customization bar and the formatting bar. Also use it for the inline link pickers: the [[ and @ expansions for finding notes to link to.

**kayg, 2026-10-15:** build the shared translucent material as ONE component and take it to production. It covers the search interface, context menus, the tab bar, the block format bar, the block customization bar and the formatting bar. Also use it for the inline link pickers: the `[[` and `@` expansions for finding notes to link to.
Author
Owner

One glass, in the app: PR #446

Every floating surface now draws one material, float-glass, from @calternal/ui. It's a class plus a <Glass /> component, with its values in tokens.css. The surfaces: the bar in all its modes (tab bar, note tools, formatting bar, block bar, Turn into / Style, sheets, toasts), search, context menus, the [[ / @ link pickers, the tag picker and the toast capsule. The tint and blur are the search mockup's lighter values (0.30 / 0.36, 20 px). Readability over a photo comes from three things:

  • a soft inner shade;
  • the panes' on-glass inks for the words and icons;
  • one denser step (0.56 / 0.60) for lines of words: menus, pickers and the bar's sheets.

What I saw and fixed on the way. With only the lighter tint (my first pass), the light-theme bar over the dark part of Mountains at 320 lost its quiet icons (Done, Link, Info, </>). This is the same problem as your iPhone shot of the block bar, only worse than on dev. The Style sheet's section labels (Text style, Block) went faint too. I compared four candidates side by side: the on-glass inks alone, the inks plus a brightness/contrast lift, and the inks plus a denser tint. The inks did nearly all the work, so the filter stays as the mockup has it. The sheets moved to the dense step. In the shots below, both now read better than on dev.

Floating element Before: tint light / dark Before: filter After: tint light / dark After: filter, shade
Tab bar, note tools, formatting bar, block format bar (the bottom bar's rows) --glass-float 0.40 / 0.42 blur 44px, saturate 200 / 190%, brightness 1.04 / 0.92 --glass-float 0.30 / 0.36 blur 20px, saturate 180 / 170%, brightness 1.04 / 0.90; new inner shade
Block customization (Turn into → Style) and the bar's sheets (Style, Insert, Info, Move, Link) 0.40 / 0.42 (the bar's) as the bar dense 0.56 / 0.60 (eases in with the morph) as the bar
Toasts (in the bar) 0.40 / 0.42 as the bar 0.30 / 0.36 as the bar
Toast capsule (outside the bar) tokens, with hard-coded fallbacks (0.72, blur 30px, saturate 180%) 0.30 / 0.36, no fallbacks as the bar
Search (the palette) 0.40 / 0.42 as the bar 0.30 / 0.36 as the bar
Context menus and submenus --glass-float-dense 0.76 / 0.78 as the bar dense 0.56 / 0.60 as the bar
[[ / @ link picker 0.40 / 0.42, painted on the tooltip itself as the bar dense 0.56 / 0.60, drawn behind the list as the bar
Tag picker 0.40 / 0.42 as the bar dense 0.56 / 0.60 as the bar
Card and gallery toolbars not in the app yet (mockup only) use <Glass /> when they land
Primitives harness its own copies of the old values reads tokens.css
Every surface, reduced transparency 0.97 0.97 (unchanged)

Unchanged on every surface: the hairline edge (--glass-float-edge) and the lift (--shadow-float). New on every surface: --glass-float-shade, inset 0 0 22px of the tint at 34% (light rgb(253 250 245 / 0.34), dark rgb(24 21 18 / 0.34)), and the on-glass inks (--glass-ink-2/3/4) for the words and icons on the glass.

Not floating, so not changed: the places and list panes and the Settings card (--glass, --glass-pane), the phone's top band (.glassy), the page's own blur, the sign-in card, and the warm tooltips (solid on purpose).

Perf: no regression; the details and numbers are in the PR. With the Insert sheet open (a big glass over a scrolling page), the compositor works about 13% less, from the 20 px blur.

Screenshots (Chromium; in each image, dev above and this branch below. Surfaces, left to right: bar at rest, formatting bar, block bar, Turn into / Style, context menu, [[ picker, toast, Insert sheet, search). The note's page is set to 0% opacity, so the photo sits right under every surface. Playwright's WebKit draws no backdrop blur (#406), so only Chromium shows the real material.

320
Mountains, light: chromium-320-mountains-light.png
Mountains, dark: chromium-320-mountains-dark.png
canal (bright), light: chromium-320-canal-light.png
canal (bright), dark: chromium-320-canal-dark.png

390
Mountains, light: chromium-390-mountains-light.png
Mountains, dark: chromium-390-mountains-dark.png
canal (bright), light: chromium-390-canal-light.png
canal (bright), dark: chromium-390-canal-dark.png

900
Mountains, light: chromium-900-mountains-light.png
Mountains, dark: chromium-900-mountains-dark.png
canal (bright), light: chromium-900-canal-light.png
canal (bright), dark: chromium-900-canal-dark.png

1440
Mountains, light: chromium-1440-mountains-light.png
Mountains, dark: chromium-1440-mountains-dark.png
canal (bright), light: chromium-1440-canal-light.png
canal (bright), dark: chromium-1440-canal-dark.png

Please check on a real device (the headless browsers here can't show any of this):

  1. iPhone, light theme, Mountains (or any photo with dark patches): the block bar and the formatting bar over the dark part of the photo. Every icon, including Done ✓, Link and Info, should read clearly.
  2. iPhone and Mac: open Style and Insert over a busy photo. The labels should read, and the photo should still show through, softened.
  3. Mac: right-click to open and close a menu several times over the photo. The menu should spring in and out with no moment of sharp, unblurred photo inside it.
  4. Both: type [[ in a note. The picker should be glass, not a white box. Over plain white paper it will still look nearly white, because that's what's behind it.
  5. If the glass now feels too see-through or too blurry anywhere, the values are four lines in tokens.css (--glass-float, --glass-float-dense, --glass-float-filter, --glass-float-shade).
## One glass, in the app: PR #446 Every floating surface now draws one material, `float-glass`, from `@calternal/ui`. It's a class plus a `<Glass />` component, with its values in tokens.css. The surfaces: the bar in all its modes (tab bar, note tools, formatting bar, block bar, Turn into / Style, sheets, toasts), search, context menus, the `[[` / `@` link pickers, the tag picker and the toast capsule. The tint and blur are the search mockup's lighter values (0.30 / 0.36, 20 px). Readability over a photo comes from three things: - a soft inner shade; - the panes' on-glass inks for the words and icons; - one denser step (0.56 / 0.60) for lines of words: menus, pickers and the bar's sheets. **What I saw and fixed on the way.** With only the lighter tint (my first pass), the light-theme bar over the dark part of Mountains at 320 lost its quiet icons (Done, Link, Info, `</>`). This is the same problem as your iPhone shot of the block bar, only worse than on dev. The Style sheet's section labels (Text style, Block) went faint too. I compared four candidates side by side: the on-glass inks alone, the inks plus a brightness/contrast lift, and the inks plus a denser tint. The inks did nearly all the work, so the filter stays as the mockup has it. The sheets moved to the dense step. In the shots below, both now read better than on dev. | Floating element | Before: tint light / dark | Before: filter | After: tint light / dark | After: filter, shade | |---|---|---|---|---| | Tab bar, note tools, formatting bar, block format bar (the bottom bar's rows) | `--glass-float` 0.40 / 0.42 | blur 44px, saturate 200 / 190%, brightness 1.04 / 0.92 | `--glass-float` **0.30 / 0.36** | blur **20px**, saturate **180 / 170%**, brightness 1.04 / **0.90**; new inner shade | | Block customization (Turn into → Style) and the bar's sheets (Style, Insert, Info, Move, Link) | 0.40 / 0.42 (the bar's) | as the bar | **dense 0.56 / 0.60** (eases in with the morph) | as the bar | | Toasts (in the bar) | 0.40 / 0.42 | as the bar | 0.30 / 0.36 | as the bar | | Toast capsule (outside the bar) | tokens, with hard-coded fallbacks (0.72, blur 30px, saturate 180%) | | 0.30 / 0.36, **no fallbacks** | as the bar | | Search (the palette) | 0.40 / 0.42 | as the bar | **0.30 / 0.36** | as the bar | | Context menus and submenus | `--glass-float-dense` 0.76 / 0.78 | as the bar | **dense 0.56 / 0.60** | as the bar | | `[[` / `@` link picker | 0.40 / 0.42, painted on the tooltip itself | as the bar | **dense 0.56 / 0.60**, drawn behind the list | as the bar | | Tag picker | 0.40 / 0.42 | as the bar | **dense 0.56 / 0.60** | as the bar | | Card and gallery toolbars | not in the app yet (mockup only) | | use `<Glass />` when they land | | | Primitives harness | its own copies of the old values | | reads tokens.css | | | Every surface, reduced transparency | 0.97 | | 0.97 (unchanged) | | Unchanged on every surface: the hairline edge (`--glass-float-edge`) and the lift (`--shadow-float`). New on every surface: `--glass-float-shade`, `inset 0 0 22px` of the tint at 34% (light `rgb(253 250 245 / 0.34)`, dark `rgb(24 21 18 / 0.34)`), and the on-glass inks (`--glass-ink-2/3/4`) for the words and icons on the glass. Not floating, so not changed: the places and list panes and the Settings card (`--glass`, `--glass-pane`), the phone's top band (`.glassy`), the page's own blur, the sign-in card, and the warm tooltips (solid on purpose). **Perf:** no regression; the details and numbers are in the PR. With the Insert sheet open (a big glass over a scrolling page), the compositor works about 13% less, from the 20 px blur. **Screenshots** (Chromium; in each image, dev above and this branch below. Surfaces, left to right: bar at rest, formatting bar, block bar, Turn into / Style, context menu, `[[` picker, toast, Insert sheet, search). The note's page is set to 0% opacity, so the photo sits right under every surface. Playwright's WebKit draws no backdrop blur (#406), so only Chromium shows the real material. **320** Mountains, light: ![chromium-320-mountains-light.png](https://git.kayg.org/attachments/d20b8770-defc-4423-8c28-398148f295e5) Mountains, dark: ![chromium-320-mountains-dark.png](https://git.kayg.org/attachments/bcd8be05-32f6-4a7f-a418-201febe23dd7) canal (bright), light: ![chromium-320-canal-light.png](https://git.kayg.org/attachments/4ed1fbec-89ca-4eb1-86ec-394aed60ffb0) canal (bright), dark: ![chromium-320-canal-dark.png](https://git.kayg.org/attachments/3c1f6f5b-970f-4a82-87cc-c0affa455cf7) **390** Mountains, light: ![chromium-390-mountains-light.png](https://git.kayg.org/attachments/f773876c-3e8d-4f64-9acd-13336a7a661e) Mountains, dark: ![chromium-390-mountains-dark.png](https://git.kayg.org/attachments/fa7f6e3f-23fc-4ab3-9414-335210bc2353) canal (bright), light: ![chromium-390-canal-light.png](https://git.kayg.org/attachments/9f5fd298-9ed1-4cc0-9561-52943455556c) canal (bright), dark: ![chromium-390-canal-dark.png](https://git.kayg.org/attachments/d1379ced-99e8-4e2f-8e15-424a3388491a) **900** Mountains, light: ![chromium-900-mountains-light.png](https://git.kayg.org/attachments/32478116-8a6a-46c9-a181-80de47b2fe61) Mountains, dark: ![chromium-900-mountains-dark.png](https://git.kayg.org/attachments/6c74cbc4-666f-406e-9c61-f22442bb3ae1) canal (bright), light: ![chromium-900-canal-light.png](https://git.kayg.org/attachments/6a4a0c1e-a2e5-48e8-ae30-c7b12608a438) canal (bright), dark: ![chromium-900-canal-dark.png](https://git.kayg.org/attachments/f1eb406b-e1c2-47f2-b0d3-b963059a2c61) **1440** Mountains, light: ![chromium-1440-mountains-light.png](https://git.kayg.org/attachments/28e642f3-5897-4f70-8e75-b5e4a91ab29b) Mountains, dark: ![chromium-1440-mountains-dark.png](https://git.kayg.org/attachments/4f0942a8-09f7-48b7-9398-505dda59e1a2) canal (bright), light: ![chromium-1440-canal-light.png](https://git.kayg.org/attachments/02e329a7-6514-4943-a5aa-2cc1b6af4724) canal (bright), dark: ![chromium-1440-canal-dark.png](https://git.kayg.org/attachments/34f0ae75-9084-4946-8ed8-2c13a621291f) **Please check on a real device** (the headless browsers here can't show any of this): 1. **iPhone, light theme, Mountains (or any photo with dark patches):** the block bar and the formatting bar over the dark part of the photo. Every icon, including Done ✓, Link and Info, should read clearly. 2. **iPhone and Mac:** open Style and Insert over a busy photo. The labels should read, and the photo should still show through, softened. 3. **Mac:** right-click to open and close a menu several times over the photo. The menu should spring in and out with no moment of sharp, unblurred photo inside it. 4. **Both:** type `[[` in a note. The picker should be glass, not a white box. Over plain white paper it will still look nearly white, because that's what's behind it. 5. If the glass now feels too see-through or too blurry anywhere, the values are four lines in `tokens.css` (`--glass-float`, `--glass-float-dense`, `--glass-float-filter`, `--glass-float-shade`).
Author
Owner

Closing during the 26 Oct handover cleanup: One glass material landed in dev (PR #446).

Closing during the 26 Oct handover cleanup: One glass material landed in dev (PR #446).
kayg closed this issue 2026-10-26 08:46:10 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#319
No description provided.