{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/1234","labels_url":"https://api.github.com/repos/facebook/react-native/issues/1234/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/1234/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/1234/events","html_url":"https://github.com/facebook/react-native/issues/1234","id":75182773,"number":1234,"title":"Vertical centering fails when container has absolute positioning and no explicit height","user":{"login":"premasagar","id":116809,"avatar_url":"https://avatars.githubusercontent.com/u/116809?v=3","gravatar_id":"","url":"https://api.github.com/users/premasagar","html_url":"https://github.com/premasagar","followers_url":"https://api.github.com/users/premasagar/followers","following_url":"https://api.github.com/users/premasagar/following{/other_user}","gists_url":"https://api.github.com/users/premasagar/gists{/gist_id}","starred_url":"https://api.github.com/users/premasagar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/premasagar/subscriptions","organizations_url":"https://api.github.com/users/premasagar/orgs","repos_url":"https://api.github.com/users/premasagar/repos","events_url":"https://api.github.com/users/premasagar/events{/privacy}","received_events_url":"https://api.github.com/users/premasagar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-11T11:09:57Z","updated_at":"2015-05-29T22:32:23Z","closed_at":null,"body":"The code below renders like this, with the red square at the top of the container (screenshot from iOS 8.3 simulator):\r\n\r\n![positioning-1](https://cloud.githubusercontent.com/assets/116809/7563533/04c9c63e-f7d6-11e4-969a-c92f63b6cba3.png)\r\n\r\nIf an explicit `height:70` is set on the container, then the red square is vertically centered:\r\n\r\n![positioning-2](https://cloud.githubusercontent.com/assets/116809/7563534/04d04f04-f7d6-11e4-9825-e703894b0257.png)\r\n\r\nI would expect the square to be vertically centered within its container, without needing to set an explicit height. The yellow background color fills the height of the element without an explicit height set.\r\n\r\nThis is only an issue for elements that have absolute positioning, not those with relative positioning.\r\n\r\n```jsx\r\n<View>\r\n    <View style={{\r\n      position: 'absolute',\r\n      left: 0,\r\n      right: 0,\r\n      top: 0,\r\n      bottom: 0,\r\n      flex: 1,\r\n      flexDirection: 'row',\r\n      justifyContent: 'center',\r\n      alignItems: 'center',\r\n      backgroundColor: 'yellow'\r\n    }}>\r\n      <View style={{\r\n        backgroundColor: 'red',\r\n        width: 10,\r\n        height: 10\r\n      }}/>\r\n    </View>\r\n\r\n    <View style={{\r\n      opacity: 0.5,\r\n      borderColor: 'black',\r\n      borderWidth: 1\r\n    }}>\r\n      <Text>Lorem ipsum lorem ipsum</Text>\r\n      <Text>Lorem ipsum lorem ipsum</Text>\r\n      <Text>Lorem ipsum lorem ipsum</Text>\r\n      <Text>Lorem ipsum lorem ipsum</Text>\r\n    </View>\r\n  </View>\r\n```\r\n\r\nMaybe related #384"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/106951588","html_url":"https://github.com/facebook/react-native/issues/1234#issuecomment-106951588","issue_url":"https://api.github.com/repos/facebook/react-native/issues/1234","id":106951588,"user":{"login":"brentvatne","id":90494,"avatar_url":"https://avatars.githubusercontent.com/u/90494?v=3","gravatar_id":"","url":"https://api.github.com/users/brentvatne","html_url":"https://github.com/brentvatne","followers_url":"https://api.github.com/users/brentvatne/followers","following_url":"https://api.github.com/users/brentvatne/following{/other_user}","gists_url":"https://api.github.com/users/brentvatne/gists{/gist_id}","starred_url":"https://api.github.com/users/brentvatne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brentvatne/subscriptions","organizations_url":"https://api.github.com/users/brentvatne/orgs","repos_url":"https://api.github.com/users/brentvatne/repos","events_url":"https://api.github.com/users/brentvatne/events{/privacy}","received_events_url":"https://api.github.com/users/brentvatne/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T22:32:23Z","updated_at":"2015-05-29T22:32:23Z","body":"Looks like a bug to me, @lwansbrough can you test this out when you pull the newest version of css-layout? \r\n\r\nRunnable example that you can just copy and paste in: [here](https://rnplay.org/plays/QsaXWA/edit)"}}