rodneyrehm / viewport-units-buggyfill

Making viewport units (vh|vw|vmin|vmax) work properly in Mobile Safari.
MIT License
1.59k stars 151 forks source link

not work well at Android 4.1 webview #100

Closed kingda closed 6 years ago

kingda commented 6 years ago

when i test vw on XIAOMI 2A,one phone made in China , the style seemed to be broken out.So i try to fix it by myself in exploring your code, and i found that css rules style property don't contain css property which use unit with vw in XIAOMI webview. It resulted that some css rules in the style that the buggyfill.js made missed some css rules but only have content css rule, so how can i make some ways to fix it? thanks ~

rodneyrehm commented 6 years ago

The buggyfill does not add support for viewport units, it merely fixes existing the support that already existed. According to caniuse the first Android version to support viewport units was 4.4 - so I'm not surprised that Android 4.1 is not behaving as you expected.

If I misunderstood your problem, please re-open this issue :)

kingda commented 6 years ago

Thanks for your answer ~ i think that my problem was not opening the “Access-Control-Allow-Origin” header for my static domain and put the "viewport-units-buggyfill-hacks.js" before the "viewport-units-buggyfill.js".After fixing it ,it work well at MI 2A.