Feature request: Auto-resize iframes based on content
-
craig-francis last edited by
After the recent removal of the
@seamless
attribute on the<iframe>
from the WHATWG spec:https://github.com/whatwg/html/issues/331
We still need to consider the problem of setting the height of iframes, so they contain their content without scroll bars.
As discussed at:
https://github.com/whatwg/html/issues/555
https://lists.w3.org/Archives/Public/www-style/2016Jan/0236.html
https://lists.w3.org/Archives/Public/www-style/2016Feb/0004.htmlThe solution may simply involve the CSS:
#iframe { height: max-content; }
And a header on the framed content, rather than custom/buggy JavaScript.
I'm keeping my notes on:
-
craig-francis last edited by
Alternatively we could look at a new keyword for the resize[1] property, which would be useful for a <textarea> that automatically increases its height based on its content - another problem which requires JavaScript to solve.