3 ms·
> Viewport units are fundamentally broken by design. Don’t ever use them for layout. In fact I recommend against using them in any situation at all. That's a p
by tekromancr 6y ago
> Viewport units are fundamentally broken by design. Don’t ever use them for layout. In fact I recommend against using them in any situation at all.
That's a pretty bold claim. Can you elaborate on that?
- chrismorgan 6y agoSome comments I’ve made here on the topic: https://news.ycombinator.com/item?id=21244656 https://news.ycombinator.com/item?id=21244656 https://news.ycombinator.com/item?id=20956850 https://news.ycombinator.com/item?id=20956850 The currently-implemented viewport units are just fundamentally bad. And I’ve only been talking about the badness of vw; vh has further troubles of its own on mobile.
- JoshTriplett 6y agoWhat was Firefox's former behavior for viewport unit handling that other browsers didn't want to go with?
- chrismorgan 6y agohttps://github.com/w3c/csswg-drafts/issues/1766 https://github.com/w3c/csswg-drafts/issues/1766 is the main link that explains it, https://bugzilla.mozilla.org/show_bug.cgi?id=1468684 https://bugzilla.mozilla.org/show_bug.cgi?id=1468684 is also useful.
- preommr 6y agoIt's not that bad... it's just scrollbars and mobile where things get messy.
- coopsmgoops 6y agoWorse than that. Different browsers and different platforms handle scroll bars differently. Some are hidden until hovered and some have width and some don't some only have width when hovered. It's really awful if you're trying to do something with several scrolling columns
- eurasiantiger 6y agoWhy would you do something with several scrolling columns? Scrolling elements inside scrolling elements (such as a page) are an anti-pattern