Tailwind h-screen doesn’t work properly on mobile devices

The h-screen class which should set the height as the height of the screen doesn’t work on iOS. Is there a way to fix that ?

Answer

The problem is that h-screen uses 100vh as the height. As it’s mentioned in this question, 100vh aims to not work on mobile devices.

But there is a way to tricks it, but it won’t be added to tailwind because it needs JS. To know more about this ‘trick’ check this article : The trick to viewport units on mobile

Leave a Reply

Your email address will not be published. Required fields are marked *