react / react/yoga

`maxWidth` and `maxHeight` not respected when padding in one of the axiz exceeds the max values

Open
#1,796 1 comment 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

To reproduce the issue, make a single root container with these two properties set:
maxWidth: 10
paddingLeft: 100

Expected result:
The maxWidth of the container is respected and the container has a total width of 10.

Actual:
The maxWidth of the container is not respected and the container has a total width of 100.

Here is a link to a playground with the example

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 using maxWidth: 10 and paddingLeft: 100, then trace the container sizing path for this case. Done means the root container's total width remains 10 when the padding exceeds maxWidth, with regression coverage added if the relevant test location is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.