The same problem took me a step. I did not find any css solution or workaround to solve the problem.
However, if you can use jQuery (or almost JavaScript), I have code that you can use to resolve it.
var viewportHeight = $(window).height(); var viewportWidth = $(window).width(); $('body,html').css("height",viewportHeight); //if vh used in body/html too $('.someClass').css("height",viewportHeight*0.12);// or whatever percentage you used in vh $('#someId').css("width",viewportWidth*0.12);
Well, this is just an example, you can use the jQuery percent identifiers you need.
PD: There is one tip for your information. put the code in the final of your html or inside $ (document) .ready (function () {}) ;, and if you need a responsive design, put it also inside the changechange event; in this way.
$(window).on("orientationchange",function(event){ window.setTimeout(function(){ var viewportHeight = $(window).height(); var viewportWidth = $(window).width(); $('body,html').css("height",viewportHeight); $('.someClass').css("height",viewportHeight*0.12); $('.someClass').css("width",viewportWidth*0.09); $('#someId').css("height",viewportHeight*0.1); }}, 450);});
I set the timer 450ms higher due to the delay of devices performing orientation changes.
Sorry for my english greetings
MagiK source share