-
Notifications
You must be signed in to change notification settings - Fork 111
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
Implement "gap" property for flexbox algorithm #248
Conversation
Update: percentage gaps work fine if the parent node has a defined size, but they don't match Chrome/Firefox if the parent does not have a defined size. |
5ec4ca6
to
180b8b2
Compare
Ok, I think I have percentage gaps with undefined container sizes working properly (matching Chrome/Firefox) now. I have to admit that this was a bit of a trial and error process, and I don't fully understand why it works the way it does. But I'm fairly to happy to merge it anyway as:
This PR is now ready for review (although in practice is might be best to wait until to #246 is merged in order to get a better diff). |
#246 is merged! Can you rebase so I can review without losing my mind? |
…deleted if fixture is deleted)
348cab0
to
95f2642
Compare
@alice-i-cecile rebased :) |
I'm very happy with this. It's great to see how far the code base has come. And thank goodness for the generated tests. I've suggested some comments to help new readers get more comfortable with the "why" of gaps. |
Can we add an example demonstrating this? |
Also: ❤️ @nicoburns You've put in amazing work here over the last few weeks / days. Really appreciate it! |
Example added. But unfortunately in running said example, it became obvious that it wasn't computing the results quite correctly. I think this is a regression in the "fixed size gaps with undefined parent size" case due to the changes for the "percentage gaps with undefined parent size". Which wasn't caught because the existing tests because they were only testing with a defined parent size. I've added another test to cover this case (which is still failing for now). |
Co-authored-by: Alice Cecile <[email protected]>
Not merging until that regression is fixed, but the code itself is in good shape. |
d61220f
to
6ccbff2
Compare
Regression fixed :) |
Objective
Context
Yoga have recently implemented this. I pulled in their tests. They don't support percentage gaps, so we may need some more testing around that (or to remove that feature from this implementation).
This builds upon #246, which should be merged first.