Add second position: absolute pass

This commit is contained in:
Andrew Rasmussen
2014-09-30 13:11:32 -07:00
parent c149d3110d
commit 0ae8bcf8f6
4 changed files with 159 additions and 0 deletions

View File

@@ -973,5 +973,31 @@ describe('Layout', function() {
);
});
it('should layout with position: absolute, bottom', function() {
testLayout(
{style: {width: 100, height: 100}, children: [
{style: {position: 'absolute', top: 0, bottom: 20}}
]},
{width: 100, height: 100, top: 0, left: 0, children: [
{width: 0, height: 80, top: 0, left: 0}
]}
);
});
it('should layout with complicated position: absolute and justifyContent: center combo', function() {
testLayout(
{style: {width: 200, height: 200}, children: [
{style: {position: 'absolute', justifyContent: 'center', top: 0, left: 0, right: 0, bottom: 0}, children: [
{style: {width: 100, height: 100}}
]}
]},
{width: 200, height: 200, top: 0, left: 0, children: [
{width: 200, height: 200, top: 0, left: 0, children: [
{width: 100, height: 100, top: 50, left: 0}
]}
]}
);
});
});