Request to add further explanation to readme
willsmanley opened this issue · comments
I was thinking perhaps it would be nice to show something to new users explaining that the actual calculation of "rvh" basically boils down to this:
document && document.documentElement && document.documentElement.clientHeight || window.innerHeight
For a long time I used the package without knowing how this calculation was made, but opening up the files really helped.
Recently I needed to set minHeight
to calc(100rvh - 100px)
. However this wasn't possible with the package, so learning the actual expression allowed me to create a listener and get this value myself.
Hi @famouspotatoes,
Indeed, we can reveal our secret sauce recipe in the readme. rvh
units will be gone soon, and I'm rewriting the readme as well, will address it there, thanks for the advice!
The readme has been updated, closing the issue. Thanks for the advice, @famouspotatoes!