+ 1
Why viewport unit (vh vw) buggy?
i read some respond from stackoverflow and he said it isn't recommended to use viewport unit because it's buggy. why is it buggy? I saw it's really responsive, when i'm playing with the width or height of Firefox browser also tried the mobile mode in Firefox, the elements of the page will adjust and it's looks fine and good. Is the bug fixed already? or is it buggy in other browser? or is it buggy in the other part? thank you master
4 Respostas
+ 4
vw and vh units are very stable. I'm not sure what this person said.
Can you paste a link to this stackoverflow discussion in case it reveals more context?
The only mild annoyance I experience with those units is that 100vh creates a scrollbar. I'm not sure why 100vh would make a vertical scrollbar when I expect it to be exactly 100% the height of the viewport, though. I also set padding: 0; margin: 0; border-width: 0; to rule be sure no extra pixels are getting added by their defaults. I work around this by also setting overflow: hidden. This is weird but it is pretty minor and the workaround is simple.
+ 2
That answer is from 2012 which is why he said the browser support was limited and buggy. I'm very confident that now in 2021 vh and vw are supported by enough browsers that you should use it without any browser support concern.
+ 1
Josh Greig it's just an answer, not a discussion about the viewport
it's the second answer of this discussion
https://stackoverflow.com/questions/12904233/why-doesnt-em-font-size-resize-on-responsive-grid
so, is it good if we use viewport unit? Thank you
0
whoaa thank you master, no more doubt to use it 😄