Skip to content

fix(rendering): correct flex min-size:auto for replaced elements#853

Merged
andycall merged 1 commit intomainfrom
fix/text_display
Feb 10, 2026
Merged

fix(rendering): correct flex min-size:auto for replaced elements#853
andycall merged 1 commit intomainfrom
fix/text_display

Conversation

@andycall
Copy link
Member

@andycall andycall commented Feb 10, 2026

Summary

  • Fixes flex min-size:auto calculation for replaced elements (e.g., <img>) so that a definite CSS width/height properly caps the intrinsic min-content contribution. Previously, an image with width:16px but a 200px natural size would force the flex item to 200px, causing sibling flex items (like flex:1 text spans) to collapse.
  • Updates RenderReplaced.minContentWidth/Height to respect definite CSS sizes, clamping down but not inflating beyond the intrinsic size.
  • Updates _getAutoMinSize in RenderFlexLayout to read the specified CSS main size directly instead of using the constraint-dependent logical size, preventing circular dependency on flex container width.

@vercel
Copy link

vercel bot commented Feb 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
use-case Ready Ready Preview, Comment Feb 10, 2026 5:41pm
vue_usecase Ready Ready Preview, Comment Feb 10, 2026 5:41pm

Request Review

@andycall andycall merged commit da0132d into main Feb 10, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant