- From: Chris Harrelson via GitHub <sysbot+gh@w3.org>
- Date: Tue, 16 Nov 2021 01:47:35 +0000
- To: public-css-archive@w3.org
chrishtr has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-images] Layout of iframes with content intrinsic sizing that does not match the <iframe> == Right now, an `<iframe>` element's content will always have an intrinsic sizing (otherwise known as the viewport of the iframe) that matches the `<iframe>`: if the `<iframe>`'s layout size changes, then the viewport bounds of the iframe document are adjusted accordingly, and the child-document receives a new layout. Two upcoming features will change this situation: 1. Auto-resizing iframes #1771. There are modes in this proposal where the iframe could specify a fixed intrinsic sizing. 2. [Fenced frames](https://github.com/shivanigithub/fenced-frame). These are iframes that are privacy-preserving, so once they load their contents cannot change size (or else there would be a communication channel to the parent frame via resize patterns). I propose that for such situations, we apply the usual replaced element semantics, with `object-fit` specifying how the contents are scaled and positioned within the rendering of the iframe. By default, `object-fit: contain` should apply, which will letterbox the iframe content. A polyfill demo demonstrating the rendering behavior is [here](https://output.jsbin.com/xixucun). The demo simulates a fencedframe, which when loaded freezes its size (try resizing with the resizer at the bottom-right). Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6817 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 16 November 2021 01:47:37 UTC