min-height seems to product an incorrect size #1769

Open
opened 2024-12-14 03:29:52 -08:00 by kasonyang · 0 comments
kasonyang commented 2024-12-14 03:29:52 -08:00 (Migrated from github.com)

Report

Issues and Steps to Reproduce

<Layout config={{useWebDefaults: false}}>
  <Node style={{width: 350, height: 200, padding: 20}}>
    <Node style={{height: 60}}>
      <Node style={{minHeight: "100%"}} />
    </Node>
  </Node>
</Layout>

Expected Behavior

The height of third node(minHeight:"100%") equals 60

Actual Behavior

The height of third node(minHeight:"100%") is 160

Link to Code

https://www.yogalayout.dev/playground?code=DwGQhgng9grgLgAgMZQHYDMCWBzAvAb3xgGcBTAdVICMARU9MGAGzmIC4EGmyBfHgPgBQCBMAByUACakExOBCakC+AO6ZJcABYcAzAFYADABoEm0jk1wOAJgPGEABzCTJmVNhsG+QkSPFSZOQUlQjMLKwQANi8BYV8-CWlZeUVlAFs3AAlzbEsOACIARjsAUny+BAB6H19gSsTSGrqGoTrwaHh+IA

When applicable, use this fiddle to post a web repro.

# Report - [x] I have searched [existing issues](https://github.com/facebook/yoga/issues) and this is not a duplicate # Issues and Steps to Reproduce ``` <Layout config={{useWebDefaults: false}}> <Node style={{width: 350, height: 200, padding: 20}}> <Node style={{height: 60}}> <Node style={{minHeight: "100%"}} /> </Node> </Node> </Layout> ``` # Expected Behavior The height of third node(`minHeight:"100%"`) equals 60 # Actual Behavior The height of third node(`minHeight:"100%"`) is 160 # Link to Code https://www.yogalayout.dev/playground?code=DwGQhgng9grgLgAgMZQHYDMCWBzAvAb3xgGcBTAdVICMARU9MGAGzmIC4EGmyBfHgPgBQCBMAByUACakExOBCakC+AO6ZJcABYcAzAFYADABoEm0jk1wOAJgPGEABzCTJmVNhsG+QkSPFSZOQUlQjMLKwQANi8BYV8-CWlZeUVlAFs3AAlzbEsOACIARjsAUny+BAB6H19gSsTSGrqGoTrwaHh+IA ***When applicable, use this [fiddle](https://jsfiddle.net/emilsjolander/jckmwztt/) to post a web repro.***
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DaddyFrosty/yoga#1769
No description provided.