← Chrome 153 reference

v153 · html · css · shipped

Responsively-sized <iframe>

A browser-native mechanism that lets an <iframe> automatically size itself to match the intrinsic height of its embedded document — without scrollbars, JavaScript resize observers, or wrapper hacks — by combining a new CSS property on the embedding side with an opt-in meta tag in the embedded document. Ships in Chrome 153.

at a glance

Shipped inChrome 153 (status tracking; see ship status note below)
StatusProposed / Intent to Ship (desktop 154 in ChromeStatus)
SpecCSS Sizing Level 4 — Responsive iframes
Explainercss-sizing-4 responsive-iframes-explainer.md
Standards issuesWHATWG HTML #555 · CSSWG #1771 · HTML PR #12444
Blink Intent & BugIntent to Ship · Bug 418397278
ChromeStatus5108373464547328 — Responsively-sized <iframe>
Source: chromestatus.com/feature/5108373464547328; ChromeStatus API record 5108373464547328.

why it exists

Embedding a third-party widget or a self-contained page in an <iframe> almost always requires workarounds to avoid scrollbars: the padding-bottom percentage hack, ResizeObserver inside the iframe sending postMessage to the parent, or server-side knowledge of the content height. None of these are reliable across all content types, and the postMessage approach requires cooperation between two independent codebases.

The responsively-sized iframe feature provides a declarative, standards-based alternative. The iframe element automatically shrinks or grows to fit its content at load time — no scripting required on either side.

Source: css-sizing-4 responsive-iframes-explainer.md; WHATWG HTML issue #555.

Syntax and double opt-in

/* 1. Embedding side: CSS property definition */
iframe {
  frame-sizing: auto | content-width | content-height | content-block-size | content-inline-size;
}

<!-- 2. Embedded side: HTML document opt-in meta tag -->
<meta name="responsive-embedded-sizing" content="allow-origins=*">

Both sides must opt in — the embedding document and the embedded document — before the feature activates. This protects cross-origin privacy: neither party can measure the other's content without explicit consent.

embedding document: the CSS property

/* In the embedding page's stylesheet */
iframe.auto-height {
  frame-sizing: content-height;
  width: 100%;
}

Setting frame-sizing: content-height on the <iframe> element tells the browser to size the element's height based on the embedded document's natural (intrinsic) height once loaded.

embedded document: the meta tag

<!-- In the embedded document's <head> -->
<meta name="responsive-embedded-sizing" content="allow-origins=*">

The embedded document opts in by including this meta tag. The tag must be present when the load event fires for the sizing to take effect.

Source: CSS Sizing 4 §5.3 frame-sizing; WHATWG HTML PR #12444.

Inputs and outputs

Inputs: On the parent element, frame-sizing accepts keywords: auto (default static fallback sizing), content-height (or logical content-block-size), and content-width (or logical content-inline-size). On the embedded document, the <meta name="responsive-embedded-sizing"> accepts an optional content attribute such as allow-origins=* or a list of authorized embedding origins.

Outputs: When both opt-ins match at document load time, the browser computes the embedded document's layout overflow rectangle and overrides the iframe element's natural dimension on the opted-in axis. This eliminates vertical scrollbars within the iframe while preventing arbitrary script-driven frame oscillation.

Source: CSS Sizing 4 §5.3; css-sizing-4 responsive-iframes-explainer.md.

Errors and lifecycle

Errors: If either side omits the opt-in, or if the embedded meta tag specifies origin restrictions that do not include the embedding parent origin, the browser silently ignores frame-sizing and falls back to standard replaced-element dimensions (300px × 150px) with scrollbars. No JavaScript errors or CSS parse exceptions are thrown, adhering to standard CSS resilient fallback rules.

Lifecycle: Responsive sizing is evaluated strictly one-shot at the completion of the child document's load event. Subsequent DOM mutations or style shifts inside the iframe do not trigger re-sizing, precluding layout cycles and Cumulative Layout Shift (CLS) regressions.

Source: css-sizing-4 responsive-iframes-explainer.md; Chromium Issue 418397278.

Examples

The following end-to-end example illustrates the required cooperative markup on both the embedding parent and the embedded child document:

<!-- embedding page -->
<!doctype html>
<html><head>
  <style>
    .widget-frame {
      frame-sizing: content-height;
      width: 100%;
      border: 1px solid #ccc;
    }
  </style>
</head><body>
  <iframe class="widget-frame" src="https://widget.example.com/"></iframe>
</body></html>


<!-- embedded document: widget.example.com -->
<!doctype html>
<html><head>
  <meta name="responsive-embedded-sizing" content="allow-origins=*">
  <style>body { margin: 0; }</style>
</head><body>
  <p>Widget content that determines the iframe height.</p>
  <p>More content here.</p>
</body></html>

The iframe renders without a fixed height and without scrollbars. Its height matches the widget's layout overflow height at load time.

Source: css-sizing-4 responsive-iframes-explainer.md.

behaviour and constraints

BehaviourDetail
TimingOne-shot at load time only. Subsequent content changes do not trigger re-sizing, preventing layout loops and performance issues.
DirectionHeight sizing only in initial shipping phase. Width is still controlled by the embedding document as normal.
Cross-originWorks across origins — both parties must opt in explicitly.
FallbackIf the embedded document does not include the meta tag, the iframe falls back to its normal (scrollable) behaviour; frame-sizing has no effect.
Meta timingThe meta tag must be present in the document at the time the load event fires. Dynamically adding it afterwards does not activate the feature.
Source: css-sizing-4 responsive-iframes-explainer.md; CSS Sizing 4 §5.3.

browser compatibility

The page previously asserted this feature shipped in Chrome 153 (and noted 150 in earlier tables). However, when queried on 2026-10-07, the authoritative ChromeStatus API record (feature 5108373464547328) lists status as Proposed with target desktop milestone 154 under Intent to Ship. Standard engine positions are recorded below:

Engine / BrowserStatusNotes & Evidence
Chromium (Chrome & Edge)Proposed / Target 154ChromeStatus 5108373464547328; Issue 418397278; Intent to Ship
Gecko (Firefox)No signalMozilla standards-positions #1394
WebKit (Safari)No signalWebKit standards-positions #653
Developer signalsStrongly positiveCSSWG issue #1771 · WHATWG HTML issue #555
Source: ChromeStatus API record 5108373464547328; Mozilla standards-positions #1394; WebKit standards-positions #653.

security and privacy

Source: css-sizing-4 responsive-iframes-explainer.md; CSS Sizing 4 §5.3.

see also