Re: Allow auto-resize on iframe

On Tue, Jan 26, 2016 at 8:00 AM, Craig Francis <craig.francis@gmail.com> wrote:
> Considering the recent removal of <iframe seamless>...
>
> I've made a suggestion on the WHATWG issue log regarding what I consider the main use of @seamless on iframes.
[snip suggestion that CSS handle iframes getting content-sized]

I agree with HTML's removal of @seamless, and with the suggestion that
the content-height part of it is still valuable and relatively easy,
and so should be preserved somehow.

Handling this in CSS seems sensible too.  If we need an
iframe-specific property, that's less than ideal, but we accepted
SVG-specific properties that only apply to single elements, so it's
not unheard of.

Some quick conversation with fantasai suggests a few routes that we
could take that would avoid a new property:

* Define "height: max-content" to mean content-size for <iframe>s.
This is a new value that shouldn't have any web-compat burden.
* Require "iframe { height: 150px; }" in the UA stylesheet, then
redefined "height: auto" to mean content-size for <iframe>s.  This
potentially has web-compat burden, if people are explicitly setting
height:auto on iframes and expecting the current behavior, but it's
the cleanest solution.

And agree with zcorpan that cross-origin <iframe>s would need to opt
in somehow (maybe CORS is enough?) in order to get this behavior.

~TJ

Received on Tuesday, 26 January 2016 19:24:17 UTC