-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix align-content: center, flex-end alignment with margin #477
Conversation
After looking deeper into this, and trying to add failing tests, I found that it fails even without margin set, and also has an addional bug there with |
@woehrl01 When you say "removing those lines", I believe you are referring to:
I don't have a specific example available. It looks like those lines were added in #185 which involved significant changes to the layout engine in order to make it better match the W3C flexbox spec. #476 didn't repro in the version of the layout engine that is included in React Native 0.32.0-rc.0. So it seems those lines didn't break this scenario back then. If you delete those lines, what prevents the calculated cross size from exceeding the available cross size when running in the at-most measure mode? |
That's strange.
Nothing prevents it. But as the resulting value is only used for the I just want to share my findings, as I'm still not that convinced. But I also don't understand why that value should be clipped either. |
@emilsjolander has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: This fixes ```align-content: center``` and ```align-content: flex-end``` when the child exceeds the parents size. See #476. It also fixes those layouts if the child has ```margin: auto``` set. Closes #477 Differential Revision: D4697833 Pulled By: emilsjolander fbshipit-source-id: d081ec7ea559a5f2bd3271c3a4dc272960beddfa
@rigdern that's strange, as I added a test case with exactly your values, which doesn't fail in the master. Could you please verify if I correctly adapted your failing layout? |
@woehrl01 The test case I reported used a |
@rigdern Oh, thanks, I see! It's not the root node which isn't laid out correctly, I'll have a look. 🔨 |
Summary: This fixes ```align-content: center``` and ```align-content: flex-end``` when the child exceeds the parents size. See #476. It also fixes those layouts if the child has ```margin: auto``` set. Closes facebook/yoga#477 Differential Revision: D4697833 Pulled By: emilsjolander fbshipit-source-id: d081ec7ea559a5f2bd3271c3a4dc272960beddfa
This fixes
align-content: center
andalign-content: flex-end
when the child exceeds the parents size. See #476. It also fixes those layouts if the child hasmargin: auto
set.