Responsive iframes

Open
#1,443 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
40/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
css, html, javascript

Research direction

The issue is about implementing tests for the 'frame-sizing' CSS feature in the web-platform-tests suite. Start by reviewing the specification at drafts.csswg.org/css-sizing-4/#responsive-iframes and the existing test results at wpt.fyi/results/css/css-sizing/responsive-iframe. Look at the test structure in the repository to understand how CSS sizing tests are organized. 'Done' means adding new test cases that cover the embedding opt-in, embedded opt-in, and dynamic updates as described, and ensuring they pass in browsers that support the feature.

Written by the indexing model from the issue text.

Description

focus-area-proposal
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
Dominant language
JavaScript
Stars
591
Forks
39
Avg merge
3h 8m
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from web-platform-tests/interop

All issues in web-platform-tests/interop

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.