mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-24 20:45:56 +03:00
[GH-ISSUE #435] feature: default flexShrink=0 for text elements #880
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#880
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Originally created by @remorses on GitHub (Dec 21, 2025).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/435
When multiple text elements overflow a fixed-height box, the text becomes scrambled with characters overlapping. This happens because flexbox shrinks text elements to fit, causing them to render on top of each other.
Example without
flexShrink={0}:Result - scrambled text with characters from different lines overlapping:
Adding
flexShrink={0}fixes it:Result - clean text that overflows correctly:
Full reproduction code
flexShrink={0}should be the default for text elements:Related to #96. I can open a PR for this.
@kommander commented on GitHub (Dec 22, 2025):
There was an explicit reason to do this, because otherwise there was weird layout behaviour for other cases 🤔
@remorses commented on GitHub (Dec 22, 2025):
Are you sure? I think adding flexShrink zero to box was the issue, not text.