logoalt Hacker News

unilynx05/03/20251 replyview on HN

> Iframes don’t expand to fit content

Actually, that was part of the original plan - https://caniuse.com/iframe-seamless


Replies

omneity05/03/2025

I used the seamless attribute extensively in the past, it still doesn't work the way GP intended, which is to fit in the layout flow, for example to take the full width provided by the parent, or automatically resize the height (the pain of years of my career)

It worked rather like a reverse shadow DOM, allowing CSS from the parent document to leak into the child, removing borders and other visual chrome that would make it distinguishable from the host, except you still had to use fixed CSS layouts and resize it with JS.