Toast wraps mid-word at 320 ("Tras / h") #434

Closed
opened 2026-10-15 11:14:26 +00:00 by kayg · 3 comments
Owner

At 320 px the shared toast breaks "moved to Trash" mid-word, so the last letter sits on its own line. The #400 agent saw it in the swipe mockup screenshots (#400 comment 51630). It comes from the toast component, not that branch.

Fix: wrap only between words, and let long text shrink or wrap cleanly. Test at 320, 360 and 375 in light and dark.

At 320 px the shared toast breaks "moved to Trash" mid-word, so the last letter sits on its own line. The #400 agent saw it in the swipe mockup screenshots (#400 comment 51630). It comes from the toast component, not that branch. Fix: wrap only between words, and let long text shrink or wrap cleanly. Test at 320, 360 and 375 in light and dark.
Author
Owner

Screenshots at 320 px (real run of the new toast spec, chromium-390, the toast after deleting a note titled "Planning the long weekend trip").

Cause: each letter of the toast text is its own inline-block span (for the ripple), and every gap between two inline-blocks is a line break opportunity, with overflow-wrap: anywhere on top. So the line could break after any letter ("we / ekend").

Fix: letters are grouped into word spans with white-space: nowrap, and the text drops overflow-wrap: anywhere, so lines break only at the spaces.

light dark
before
after
**Screenshots at 320 px** (real run of the new toast spec, chromium-390, the toast after deleting a note titled "Planning the long weekend trip"). Cause: each letter of the toast text is its own `inline-block` span (for the ripple), and every gap between two inline-blocks is a line break opportunity, with `overflow-wrap: anywhere` on top. So the line could break after any letter ("we / ekend"). Fix: letters are grouped into word spans with `white-space: nowrap`, and the text drops `overflow-wrap: anywhere`, so lines break only at the spaces. | | light | dark | |---|---|---| | before | ![](https://git.kayg.org/attachments/abc07ac8-fa01-433d-a164-7f05432bc4e5) | ![](https://git.kayg.org/attachments/770b2a22-387e-40ea-8f3f-26d23977471f) | | after | ![](https://git.kayg.org/attachments/7348b2bc-c692-485a-8206-36f735f5b309) | ![](https://git.kayg.org/attachments/5f440443-8bd3-478d-a887-792c68495ec6) |
Author
Owner

Side gutter at 320 px (second comment; the first was the word wrap). The capsule touched the right screen edge.

Cause: on a phone Sonner's column is the window's width, pushed in 16 px by its side offset, so it ran 16 px past the right edge. The capsule (capped at 100vw - 32px) sat at 32..320 instead of 16..304. Fix: the column is calc(100vw - 32px) wide at 600 px and below, and the capsule still wraps only between words. The spec now checks a 16 px gutter on both sides for the glass and the words at 320, 360 and 375, light and dark.

Before (word wrap already fixed, gutter not) / after, 320 px:

light dark
before
after
**Side gutter at 320 px** (second comment; the first was the word wrap). The capsule touched the right screen edge. Cause: on a phone Sonner's column is the window's width, pushed in 16 px by its side offset, so it ran 16 px past the right edge. The capsule (capped at 100vw - 32px) sat at 32..320 instead of 16..304. Fix: the column is `calc(100vw - 32px)` wide at 600 px and below, and the capsule still wraps only between words. The spec now checks a 16 px gutter on both sides for the glass and the words at 320, 360 and 375, light and dark. Before (word wrap already fixed, gutter not) / after, 320 px: | | light | dark | |---|---|---| | before | ![](https://git.kayg.org/attachments/faaf5940-969b-43c9-8be1-d4771f4f7140) | ![](https://git.kayg.org/attachments/b911e2aa-7106-49b2-92cd-d90c0990934f) | | after | ![](https://git.kayg.org/attachments/e85355f8-e3c7-495b-863f-884da6f6110d) | ![](https://git.kayg.org/attachments/6c015693-f6a6-4470-a2c3-991515d6f545) |
Author
Owner

Closing during the 26 Oct handover cleanup: The toast wrap and side gutter at 320 were fixed in dev (PRs #456, #458).

Closing during the 26 Oct handover cleanup: The toast wrap and side gutter at 320 were fixed in dev (PRs #456, #458).
kayg closed this issue 2026-10-26 08:46:25 +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#434
No description provided.