react / react/yoga

min-height seems to product an incorrect size

Open
#1,769 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
18.9k
Forks
1.6k
Avg merge
1m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Yoga playground reproduction and verify the reported case with useWebDefaults disabled. Trace how the nested node's minHeight of 100% is resolved, and consider the issue complete when that node measures 60 rather than 160 for the supplied layout.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.