Passer au contenu principal
Bluvy Tube
Appuyez sur Échap pour quitter le plein écran
Volume m
/
i
Mode Cinéma t
f
/
I don't understand the hype around Chrome's responsive iframes feature. It only sets the size on load, so anything which changes the size after that causes the size to be wrong. …

Raccourcis clavier

Espace K
Lecture / pause
← →
Reculer / avancer de 5 s
J L
Reculer / avancer de 10 s
0–9
Aller à 0 %–90 % de la vidéo
Home End
Début / fin
, .
Image précédente / suivante (en pause)
< >
Ralentir / accélérer
↑ ↓
Volume
M
Couper / rétablir le son
C
Sous-titres
F
Plein écran
I
Image dans l’image
T
Mode cinéma
?
Afficher cette aide

I don't understand the hype around Chrome's responsive iframes feature. It only sets the size on load, so anything which changes the size after that causes the size to be wrong. …

0 vue Publié le 16/10/2026 14:44 0:28
I don't understand the hype around Chrome's responsive iframes feature. It only sets the size on load, so anything which changes the size after that causes the size to be wrong. …
5 commentaires
?
Mihkel Eidast @mihkel.eida.st · 16/10/2026 21:23
Ugh, to me the hype is that we've had to use a JS library (iframe-resizer) for this for far too many years. But if this feature does not actually replace the lib it's quite pointless.
Hey Jake, I'll respond here then link this to the same question in the CSSWG issue.

Basically if we did this anytime the overflow changed, or on some resize-observer, etc, its far too trivial to create "infinite" layouts.

Say for example you had `<div style="height: 200vh">`

....
This would (within a second) grow the iframe to an infinite size. This feature is different from other layout features as the communication is asynchronous (e.g. the child frame as its can be cross origin needs to asynchronously send its size to the parent).

....
This feels like... just use container queries?

I don't get the value proposition here
Bart Mesuere @bartm.be · 16/10/2026 15:04
According to @bram.us this is not expected behaviour. I reported it as bug here: issues.chromium.org/issues/56538...
Chromium
My interpretation is that he's saying it _is_ expected behaviour, according to the spec. But I'll let him clarify.

I'm slightly 🤯 that "the iframe resizes" wasn't tested/considered are part of a "responsive iframe" feature.
You can call requestResize in the frame to resize, which you can plug into a ResizeObserver on the document, but why isn't that just the default?

But, if the iframe is resized on the outside, it'll be wrong, and it seems like requestResize doesn't even fix it.

…
Even weirder, the spec (drafts.csswg.org/css-sizing-4...) suggests that the iframe's document size should be locked until reload, so in the video Chrome is wrong to rewrap the text. But… doesn't that defeat the point of 'responsive'?

@bram.us help me make sense of it!

Demo:
Responsive iframe demo
Voir le post d'origine sur Bluesky
Lien copié dans le presse-papier

Connexion

Il est temps de faire une pause

Ça fait 30 minutes que vous enchaînez les vidéos : accordez-vous 5 minutes loin de l'écran. Levez-vous, étirez-vous, buvez un verre d'eau… Les vidéos vous attendront ici.