Is it really invalid to omit a meta viewport?
rviscomi opened this issue · 1 comments
Current behavior:
I see this on https://www.amazon.com/ when I'm logged in using a desktop device. When I emulate a mobile viewport, they adaptively serve a meta viewport, albeit with validation warnings of its own:
Given that meta viewports are really only useful for mobile devices, it's not necessarily bad for a desktop site to omit one. The thing is that it's hard for Capo to know whether we're looking at the desktop version of a site or whether it adaptively serves a meta viewport for the mobile version.
I'd be interested to hear feedback on whether it's generally a good idea to always have one, in which case we should keep the validation warning, or if there are too many use cases where omitting it is valid and removing the warning would be better.
Dynamically injecting a viewport tag depends on browser sniffing which can easily break. While in some situations it might be okay to omit I would very much consider it an anti-pattern to do so.