In Viewport calculation is off by one
Closed this issue · 5 comments
weotch commented
Check out these examples where I have created two boxes:
- Example 1: http://codepen.io/weotch/pen/VmWxJj
- Example 2: http://codepen.io/weotch/pen/RogJbp
In the first example, they are both have heights of 100vh
. Note that they both register as in viewport even though the second box should be pushed out of it by the first, which should completely fill the viewport.
In the second example, the boxes have heights of calc(100vh + 1px)
. Now, the second box correctly registers as being out of the viewport.
stutrek commented
😮
Is it consistent between browsers?
weotch commented
Yeah, happening in latest chrome, firefox, safari as well as IE edge.
weotch commented
🍻
weotch commented
stutrek commented
Oops, published.