We have an issue on mobile that involves using the vh
unit. Rather than have a gap at the top/bottom of the page that isn't consistent we are hoping to use a couple of the newer features to help us cut the mustard for support.
I'm not having much like determining if the @supports(...){}
media query has a way to work for us here. What I'm hoping to accomplish is...
Check support for css
env()
_This would also include a check to the JS version ofCSS.supports
to include JS to update the next fallback...Check support for CSS variables. Using this feature we'd just recalculate the
vh
based on the windowsinnerHeight
(?) and assign it to a CSS variable--vh
If neither of those two options is available we'd fall back to just much larger than required top and bottom margins.
Is it possible to use the @supports(...){}
media query for either of these two features?