Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[Issue facebook/css-layout#78]: Implemented alignContent ; #79
So this implements align-content. It follows the W3C specs, that's how it works in Chrome as far as I have tested. I tried to make sure that it didn't touch any pre-existing code as much as possible.
All the current tests are working (in RunLayoutTests.html and with make - JS, C & Java). RunLayoutRandomTests.html is failing but then it was failing without these changes so I suppose its an issue with the random test suite not being up-to-date.
I'm going to add some more test cases in Jasmine and add this in react-native. From simple tests it works fine in react-native but I need to add alignContent in there to make sure that the new feature works correctly.
Let me know if you have any comment about the implementation itself.
referenced this pull request
May 7, 2015
Right now random tests are broken for some really edgy cases. What I usually do is to disable the attributes that are making those tests to fail until they are clean. Then, add your new feature and run the automated tests.
I cannot really bring this in without any tests, can you make sure to add at least 5 test cases to make sure that your feature is working correctly, but more importantly that if we make further modifications down the road, it won't break down.
Thanks! This is super exciting!
I've added 16 test cases for the new alignContent code.
I also added pixel snapping in the layout tests, please check the code for a more complete description, but the issue is that chrome seems to change its layout code so the floating points values of layoutDom change from version to version, the snapping code I added assumes that it's ok to be 'only' pixel perfect, and that we don't care if there's a sub-pixel difference.
I have Chrome 42.0.2311.135 (64-bit) on OSX and 19 tests fail (without the alignContent changes - just after pulling the current master) because of floating point deviations. The biggest issue imo is that my Windows machine still works fine, so even if the code is 'fixed' for Chrome 42 on OSX other platforms might still give different results.