trys / utopia-core-scss

The calculations behind Utopia.fyi. Written in SCSS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider using `vw` instead of `vi` for a while

nachtfunke opened this issue · comments

Hello!

I noticed that the clamp function uses logical viewport units, vi instead of vw https://github.com/trys/utopia-core-scss/blob/main/src/utopia.scss#L13. Support for this unit seems a bit shaky for at least some older browsers.

This is just a suggestion of course, but maybe it would be wise to at least for a while still, use vw for a while. In my case, I have to add postprocessing to my build process because I have get rid of this unit.

commented

I agree, thanks @nachtfunke!

Scrolling in Firefox on iOS becomes very messy because as the status bar is hidden/displayed the logical viewport size changes, and with it all the contents of the page.

What makes this especially nasty is that it is difficult to find out how supported the vi unit is. Not even caniuse gives any good answers: https://caniuse.com/viewport-units or https://caniuse.com/viewport-unit-variants