Skip to content

Responsive iframes #1443

Open
Open

Description

@bramus

Description

Embedding third-party content (e.g., payment widgets, comment sections, social posts, live charts, embedded demos) is one of the most fundamental architecture patterns on the web.

However, <iframe> elements have historically been unable to automatically size themselves to the natural dimensions of their embedded documents without producing scrollbars or requiring brittle postMessage() polyfills .

Responsive Iframes (part of CSS Box Sizing Module Level 4) introduces a standardized, security-preserving mechanism for seamless frame sizing and consists of three parts:

  • Embedding Opt-in: The parent document specifies frame-sizing: content-height | content-width | content-block-size | content-inline-size | none on the <iframe>
  • Embedded Opt-in: The embedded document includes <meta name="responsive-embedded-sizing"> to explicitly authorize sharing its layout intrinsic size
  • Dynamic Updates: The embedded document can trigger re-measurements via window.requestResize()

Specification

https://drafts.csswg.org/css-sizing-4/#responsive-iframes

web-feature

frame-sizing

Test Links

https://wpt.fyi/results/css/css-sizing/responsive-iframe

Additional Signals

Activity

  1. github-actions commented on Sep 22, 2026

    @github-actions

    This comment was automatically generated based on the information you provided. Please don't edit it.

    Below is additional information about the web feature (from the web-features project) which is referenced in your proposal.
    If this doesn't accurately correspond to your proposal, please update your initial comment to include web-features: <feature-id>.
    To find feature IDs, use the web-features explorer.

    Feature Responsive iframes

    • ID: frame-sizing
    • Name: Responsive iframes
    • Description: The frame-sizing CSS property sets the size of an <iframe> element to that of it contents, to avoid scrolling in the iframe. Embedded documents allow this with the <meta name="responsive-embedded-sizing"> element and request resizing in the embedding page by calling window.requestResize().
    • Baseline status: Limited Availability
    • Docs: Window: requestResize() method, frame-sizing CSS property,
    • Developer signals: 35 votes / 2 use cases (details)
    • More information: See the web-features explorer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    focus-area-proposal

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions