viewport units on mobile #1610
-
There is a problem with See Css Trick Article on this: Is there any way to fix it but to use |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 5 replies
-
I cane across this https://dev.to/peiche/100vh-behavior-on-chrome-2hm8. He suggest to use .h-screen {
@supports (-webkit-appearance:none) {
.os-android & {
min-height: calc(100vh - 56px);
}
}
} |
Beta Was this translation helpful? Give feedback.
-
I'd recommend using this PostCSS plugin to handle this: https://github.com/postcss/postcss-100vh-fix Closing since not planning to make any changes to Tailwind itself but that should help you out! |
Beta Was this translation helpful? Give feedback.
-
It works perfectly! I add for completeness that using TailwindCSS 2.0.1 with PostCSS 7 compatibility I had to install postcss-100vh-fix 0.1.1 yarn add -D postcss-100vh-fix@0.1.1 |
Beta Was this translation helpful? Give feedback.
-
@astagi how did you get it to work? Do I just need to add
to nuxt.config.js ? I installed the plugin and added the code above, but it does not seem to change anything. |
Beta Was this translation helpful? Give feedback.
-
Moving this to discussions since at least two people are interested in this 👍 |
Beta Was this translation helpful? Give feedback.
-
in case someone is trying to fix this problem in next js or react, just add this code to _app.js or the file you're using on react
and on tailwind.config.js:
based on this solution for vue |
Beta Was this translation helpful? Give feedback.
-
All the solutions above didn't work for me. Someone should help me out. -webkit-fill-available, 100vh no results. |
Beta Was this translation helpful? Give feedback.
I'd recommend using this PostCSS plugin to handle this:
https://github.com/postcss/postcss-100vh-fix
Closing since not planning to make any changes to Tailwind itself but that should help you out!