Body text weight in the app looks thinner than in the mockups #492

Closed
opened 2026-10-16 11:34:53 +00:00 by kayg · 3 comments
Owner

kayg's report: the body text in the mockups (preview.calternal.cloud, chrome.html / blocks.html notes) looks better, with nicer weight, than in the prod app (calternal.cloud, CodeMirror editor).

Both use font-weight: var(--body-weight) (410 light / 440 dark), so the difference is elsewhere.

Plan: render the same paragraph in both at 1440 and 390, light and dark, Chromium and WebKit; diff getComputedStyle (family, weight, variation settings, feature settings, optical sizing, line-height, letter-spacing, colour, smoothing, text-rendering) and the font file that loaded; post crops and the diff here; make the app match with a minimal change; PR (not merged).

kayg's report: the body text in the mockups (preview.calternal.cloud, chrome.html / blocks.html notes) looks better, with nicer weight, than in the prod app (calternal.cloud, CodeMirror editor). Both use `font-weight: var(--body-weight)` (410 light / 440 dark), so the difference is elsewhere. Plan: render the same paragraph in both at 1440 and 390, light and dark, Chromium and WebKit; diff getComputedStyle (family, weight, variation settings, feature settings, optical sizing, line-height, letter-spacing, colour, smoothing, text-rendering) and the font file that loaded; post crops and the diff here; make the app match with a minimal change; PR (not merged).
Author
Owner

Findings so far (computed styles)

Compared the same paragraph in the app (prod build of origin/dev, CodeMirror .cm-line) and the deployed mockup (.page .body .text), Chromium 1440/390, light and dark: every property is identical: font-family, weight (410 light / 440 dark), variation settings (normal), feature settings, optical sizing (auto), size 17px, line-height 27.2px, letter-spacing, colour, text-rendering, -webkit-font-smoothing (antialiased in light, auto in dark), and the same font files loaded (Google Sans Flex variable). So the editor rule is not the cause; the mockup and the app render the same weight, and both are thin.

What does differ is shared: packages/ui/src/styles/base.css set -webkit-font-smoothing: antialiased on the root. On macOS that turns off the system's own smoothing, so text draws thinner than native apps (iPhone ignores the property). Dark only escaped it for the editor body (reset to auto), not for the panes or UI.

Pane text: the list/places panes carry backdrop-filter and transform: translateZ(0) on the same element that holds their text (not a childless glass layer, unlike the floating glass). No fractional translate or will-change on the text's ancestors was found; I am leaving that layering alone (it is a deliberate perf choice, #2/#19/#37) and cannot confirm on a Mac that it softens text.

Fix (PR follows): drop the global antialiased (system default everywhere), light --body-weight 410 -> 460, light --ui-weight 420 -> 440, dark unchanged (440 / 450), as dark was already on system smoothing. Mockup agent: use these same numbers.

app-chromium-1440-light-w410.png
app-chromium-1440-light-w410.png

app-chromium-1440-light-w450.png
app-chromium-1440-light-w450.png

app-chromium-1440-light-w470.png
app-chromium-1440-light-w470.png

**Findings so far (computed styles)** Compared the same paragraph in the app (prod build of origin/dev, CodeMirror `.cm-line`) and the deployed mockup (`.page .body .text`), Chromium 1440/390, light and dark: every property is **identical**: font-family, weight (410 light / 440 dark), variation settings (normal), feature settings, optical sizing (auto), size 17px, line-height 27.2px, letter-spacing, colour, text-rendering, `-webkit-font-smoothing` (antialiased in light, auto in dark), and the same font files loaded (Google Sans Flex variable). So the editor rule is not the cause; the mockup and the app render the same weight, and both are thin. What does differ is shared: `packages/ui/src/styles/base.css` set `-webkit-font-smoothing: antialiased` on the root. On macOS that turns off the system's own smoothing, so text draws thinner than native apps (iPhone ignores the property). Dark only escaped it for the editor body (reset to `auto`), not for the panes or UI. Pane text: the list/places panes carry `backdrop-filter` and `transform: translateZ(0)` on the same element that holds their text (not a childless glass layer, unlike the floating glass). No fractional translate or will-change on the text's ancestors was found; I am leaving that layering alone (it is a deliberate perf choice, #2/#19/#37) and cannot confirm on a Mac that it softens text. **Fix (PR follows)**: drop the global `antialiased` (system default everywhere), light `--body-weight` 410 -> **460**, light `--ui-weight` 420 -> **440**, dark unchanged (440 / 450), as dark was already on system smoothing. Mockup agent: use these same numbers. app-chromium-1440-light-w410.png ![app-chromium-1440-light-w410.png](https://git.kayg.org/attachments/2771e565-d08a-47a0-bbcf-5ebc5f3f32d4) app-chromium-1440-light-w450.png ![app-chromium-1440-light-w450.png](https://git.kayg.org/attachments/c3fd9d45-52b4-49ea-bce6-f57819680d0d) app-chromium-1440-light-w470.png ![app-chromium-1440-light-w470.png](https://git.kayg.org/attachments/af0d7eaa-0641-4dca-b12d-b85101c4f4c7)
Author
Owner

PR #506 opened (not merged): #506

Final numbers: light body-weight 460 (was 410), light ui-weight 440 (was 420), dark 440/450 unchanged, global antialiased removed. Crops at 2x DPR: before then after for light WebKit 1440, dark Chromium 1440, light WebKit 390. Tests: editor, text-size, phone-edges on chromium-1440 and webkit-390 pass; contrast passes.

cmp-before-webkit-1440-light.png
cmp-before-webkit-1440-light.png

cmp-after-webkit-1440-light.png
cmp-after-webkit-1440-light.png

cmp-before-chromium-1440-dark.png
cmp-before-chromium-1440-dark.png

cmp-after-chromium-1440-dark.png
cmp-after-chromium-1440-dark.png

cmp-before-webkit-390-light.png
cmp-before-webkit-390-light.png

cmp-after-webkit-390-light.png
cmp-after-webkit-390-light.png

PR #506 opened (not merged): https://git.kayg.org/kayg/calternal/pulls/506 Final numbers: light body-weight 460 (was 410), light ui-weight 440 (was 420), dark 440/450 unchanged, global antialiased removed. Crops at 2x DPR: before then after for light WebKit 1440, dark Chromium 1440, light WebKit 390. Tests: editor, text-size, phone-edges on chromium-1440 and webkit-390 pass; contrast passes. cmp-before-webkit-1440-light.png ![cmp-before-webkit-1440-light.png](https://git.kayg.org/attachments/f3796b20-43bf-4a64-81bb-559593740903) cmp-after-webkit-1440-light.png ![cmp-after-webkit-1440-light.png](https://git.kayg.org/attachments/f0de640a-2cfd-4dcf-af00-0fa520695ff8) cmp-before-chromium-1440-dark.png ![cmp-before-chromium-1440-dark.png](https://git.kayg.org/attachments/670970fe-5d94-47ee-bd16-b82385f39650) cmp-after-chromium-1440-dark.png ![cmp-after-chromium-1440-dark.png](https://git.kayg.org/attachments/d33d7679-5c0f-4607-b4a4-4c309a747a63) cmp-before-webkit-390-light.png ![cmp-before-webkit-390-light.png](https://git.kayg.org/attachments/41231f18-a5d6-4a93-b390-55b9cb40b2ae) cmp-after-webkit-390-light.png ![cmp-after-webkit-390-light.png](https://git.kayg.org/attachments/ddfee118-21c6-4fcb-b51f-a8980246bc16)
Author
Owner

Closing during the 26 Oct handover cleanup: The body text weight fix landed in dev (PR #506).

Closing during the 26 Oct handover cleanup: The body text weight fix landed in dev (PR #506).
kayg closed this issue 2026-10-26 08:46:34 +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#492
No description provided.