rviscomi / capo.js

Get your <head> in order

Home Page:https://rviscomi.github.io/capo.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve viewport warning for `shrink-to-fit`

rviscomi opened this issue · comments

According to Stack Overflow and this blog post shrink-to-fit is a non-standard directive briefly supported by older versions of Safari (9.0–9.2 circa 2018).

Capo will warn if it sees this directive, flagging it as invalid:

❌ Invalid viewport directive "shrink-to-fit".

Here's an example of it in the wild: https://rviscomi.github.io/capo.js/user/demo/?url=https%3A%2F%2Fwww.cnn.com%2F (cnn.com)

<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
image

We could provide better messaging for developers who believe that this directive is valid and they still need it, similar to the IE-specific obsoletion warnings.