-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The <amp-iframe> 600px / 75% rule - based on what width? #1639
Comments
I believe this is measured independently of width. In the context of a device, the restriction has different ramifications, but the enforcement will be the same across screen sizes. /cc @cramforce |
This restriction can be removed by adding a placeholder as described here: https://github.com/ampproject/amphtml/blob/a5b3a0f6153f71fbec7e5648bd46b79f6b4013e1/extensions/amp-iframe/amp-iframe.md |
Since you're asking for feedback I think the rule is pretty unusable as defined. What rule effectively says is "always use a placeholder or your code will fail randomly when some user has a screen wider than you anticipated". Perhaps just changing it to make placeholders mandatory would be simpler all round? |
That's what we ended up doing for the WordPress plugin. There isn't a super |
@mjangda What do you put into that placeholder? |
Just a |
Closing since we've captured mandatory placeholder in #1356 |
The
<amp-iframe>
spec, and the validation code, reference the 600px/75% rule. However there is no description of what width that applies to. For example 600px down on a iPhone 4 is a completely different proposition to the same content on an iPad pro or a desktop. What width does the CDN use when validating? Do publishers have to guess based on the user agent what width they are dealing with and adjust content? Always use worst case?The text was updated successfully, but these errors were encountered: