3 ms·
I intentionally left these out, as they are practically useless: - using vw/vh for font size / inline block sizing breaks zoom - for the above reason, vw/vh i
by eurasiantiger 4y ago
I intentionally left these out, as they are practically useless:
- using vw/vh for font size / inline block sizing breaks zoom
- for the above reason, vw/vh is only useful for layout sizing, and there it is (almost?) always equal to % units
Is there a good use case for vw/vh not mentioned above?
- chrismorgan 4y agoAlso the vw/vh units are fundamentally broken, including viewport scrollbars, so that 100vw is wider than the viewport if there’s a vertical scrollbar and you’re on a platform where scrollbars take space (which is still most desktop platforms), thus triggering a horizontal scrollbar. Long ago the spec had a cumbersome and mildly imperfect solution for this, but only Firefox implemented it, and no one else wanted to so they eventually ripped it out of the spec and Firefox and left us with fundamentally broken units. Then they made new versions of the units to deal with the ways in which they were broken in ways that were a bit fiddly to deal with on mobile platforms, but completely ignored the way they were still completely broken on most desktop platforms. Sigh. In short: viewport units are always wrong if you can have scrollbars, containing up to about 4% of error (though much more is theoretically possible). It is possible to use them safely, but the trouble is that most places where you actually want them can’t tolerate that error, so in practice they’re almost useless.