Skip to content

Commit

Permalink
[AspectRatio] Add a test for <picture>
Browse files Browse the repository at this point in the history
<picture> does not currently let you specify an aspect ratio per
source:
w3c/csswg-drafts#5212
whatwg/html#4968

So this just tests setting a single aspect-ratio on the <img> element
for now.

Bug: 1045668
Change-Id: I89f5132322f8131bf346ea663b889e3b1d740e7c
  • Loading branch information
cbiesinger authored and chromium-wpt-export-bot committed Jun 19, 2020
1 parent ae56420 commit 8588e19
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions css/css-sizing/aspect-ratio/replaced-element-012.tentative.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<title>CSS aspect-ratio: picture</title>
<link rel="author" title="Google LLC" href="https://www.google.com/">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht" />

<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>

<picture>
<source srcset="support/20x50-green.png">
<img style="width: 100px; aspect-ratio: 1/1;">
</picture>

0 comments on commit 8588e19

Please sign in to comment.