I agree exposing view dimensions would be useful for things like what you're trying to do here as well as text sizing (there is a workaround for the latter posted in a comment on the idea linked in one of my earlier posts on this thread). It sounds like we'll likely get access to these at some point in the future, but not yet: