The issue is that we're setting the height in https://github.com/mozilla-b2g/gaia/pull/14508/files#diff-74841e428dea67f7357f1893a4d26155R967 so how could you retrieve the available height?

I don't like this so much either. I think (hope) we can do better using flex-box or display: table if we take some time to think about it.