Re: [csswg-drafts] [css-sizing] Auto-resize iframes based on content (#1771)

@tabatkins Thanks for the background on intrinsic size, that really makes sense.

I think a default `contain-intrinsic-size` would be useful, only because 3rd party services could say "You can include our thing *safely* on your website with":

    <iframe src="https://..." allow="resize"></iframe>

I'd rather not see them adding (unsafe-)inline styles to their example/template, or making assumptions on what would be appropriate for the page it will appear on. Maybe browsers could use `iframe[allow~=resize] { contain-intrinsic-size: from-element 300px 150px; }` in their default style sheet, so developers would see it in their dev-tools, find out what it does, and/or hopefully notice they are getting a weird resize/reflow on page load, and copy/customise it for their website (while the remove the border, set a width, and maybe a max-height).

And yes, they would need it for a `<textarea>` (I like this suggestion as well), but I suspect many developers would be doing a copy/paste/tweak, rather than learning/remembering.

-- 
GitHub Notification of comment by craigfrancis
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1771#issuecomment-806574879 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 25 March 2021 11:28:31 UTC