handle position: absolute margin as child correctly

This commit is contained in:
Christopher Chedeau
2014-04-21 14:53:02 -07:00
parent ddcca9107b
commit 72e2d959f2
2 changed files with 16 additions and 5 deletions

View File

@@ -482,6 +482,17 @@ describe('Layout', function() {
);
});
it('should layout node with child with position: absolute and margin', function() {
testLayout(
{style: {}, children: [
{style: {marginRight: 15, position: 'absolute'}}
]},
{width: 0, height: 0, top: 0, left: 0, children: [
{width: 0, height: 0, top: 0, left: 0}
]}
);
});
it('should layout randomly', function() {
function RNG(seed) {
this.state = seed;