fix(webkit): stop wrapped toast titles overlapping and pin the glyph to line one - #900
Open
gabriel-lisboa-azion wants to merge 1 commit into
Open
fix(webkit): stop wrapped toast titles overlapping and pin the glyph to line one#900gabriel-lisboa-azion wants to merge 1 commit into
gabriel-lisboa-azion wants to merge 1 commit into
Conversation
…to line one Two defects that only appear once a toast wraps, which it does routinely — an icon and a trailing action together leave the title barely half of the 356px region. `ToastTitle` carried `leading-none`, pinning the line box to the font size (14px) while the glyphs need 18px, so every wrapped title overlapped its own next line by 4px. `text-label-md` already carries the token leading (1.5), which is what a multi-line title needs; the single-line case is unchanged. The leading glyph was centred on the whole card (`items-center` plus `self-center`), which put it beside the middle of a wrapped message, pointing at nothing. It now gets the title's line box — `h-[1lh]` on a box carrying `text-label-md` resolves to exactly the leading `ToastTitle` uses — so it sits on the first line whether the card is one line or four. The trailing action moves to the same row for the same reason.
gabriel-lisboa-azion
force-pushed
the
fix/toast-multiline-title
branch
from
August 17, 2026 12:38
803dc91 to
a160551
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fix/toast-item-alignment, notmain) — it continues that work rather than competing with it. GitHub will retarget this tomainonce fix(webkit): align a toast's leading icon to its title, not to the whole row #892 merges.ToastTitlecarriedleading-none, pinning the line box to the font size (14px) while the glyphs need 18px, so every wrapped title overlapped its own next line by 4px.text-label-mdalready carries the token leading (1.5). The single-line case is unchanged.h-[1lh]on a box carryingtext-label-mdresolves to exactly the leadingToastTitleuses — so it sits on the first line at any card height. TheloadingSpinner shares that wrapper instead of keepingself-center, which centred it on the whole card.How to test
cd packages/webkit && npx vitest run src/components/feedback/toast→ 23 passed.pnpm storybook:dev→ Components/Feedback/Toast. Give a toast a long message so the title wraps: before, consecutive title lines overlap by ~4px; now they are cleanly spaced. The severity icon (and theloadingspinner) sits on the title's first line, not the middle of the block.Notes