fix(ui) LogoHeading: account for bee width in span layout #22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-logo-heading-bee-overflow"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The bee favicon in
LogoHeadingwas absolutely positioned with a negativerightoffset (-right-12/8/6), placing it outside the span's layout box. The browser wraps the title text at the full container width without knowing the bee needs space to the right, so on narrow screens the bee overflows off the right edge.Fix: Add right padding to the span equal to the bee's width at each heading level (
pr-12/8/6) and anchor the bee withright-0instead of-right-{n}. The bee's visual position relative to the text end is identical — only the span's layout box now includes that space, so text wraps before the bee would clip.Test plan
🤖 Generated with Claude Code
The bee was positioned with a negative right offset, placing it outside the span's layout box. On narrow screens the text wrapped at the full container width and the bee overflowed off the right edge. Fix: add right padding equal to the bee's width and anchor it with right-0 instead of -right-{n}. The bee's visual position relative to the text is unchanged, but the span now reserves the bee's space in the layout so text wraps before the bee would clip. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>When the widest line is line 2 (e.g. "getrockneten Cranberries" under a shorter "Apfelbrot mit"), deriving top from widestLine.top placed the bee between the lines rather than at the heading's top-right corner. Fix: revert top to the Tailwind -top-{n} class (constant offset above the outer span's top = above the first line). Only left is measured dynamically. This restores the original "top-right corner of the text block" intent: vertical = above line 1, horizontal = end of widest line. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>Without min-w-0, the default min-width:auto on flex items allows the title container to expand beyond its share of the flex row, keeping long titles on one line when they should wrap. This caused the bee to sit at the end of an overly long single line and bleed into the action buttons area ("bee moves into the header"). Adding min-w-0 to both nested flex-1 divs properly constrains the title area so text wraps at the correct breakpoint and the bee stays within bounds. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.