Reputation: 7675
Like, what are the browser limitations? If I have 99999999999999vh will it actually be 99999999999999vh or will it be something weird like 2145629vh?
Upvotes: 6
Views: 1821
Reputation: 54212
From the viewport height (vh) specification, it does not mention there is a limit of min/max value. However, in Section 5 of CSS Values and Units: Numeric Data Types, it mentions that:
CSS theoretically supports infinite precision and infinite ranges for all value types; however in reality implementations have finite capacity. UAs should support reasonably useful ranges and precisions.
and some SO users do test the limit of values of each browsers, and the results are as follow:
Firefox: 33554400px
Chrome: 33554428px
Opera: 33554428px
IE 9: 21474836.47px
and the above behavior is explained in Section 5: Distance Units:
While some properties allow negative length values, this may complicate the formatting and there may be implementation-specific limits. If a negative length value is allowed but cannot be supported, it must be converted to the nearest value that can be supported.
Hope the above can answer your question.
Upvotes: 10