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
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2254454
Auto-Submit: Christian Biesinger <[email protected]>
Commit-Queue: Ian Kilpatrick <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#780870}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6e558e21d4240c7d676e049f9ae2d7691356decd
  • Loading branch information
cbiesinger authored and Commit Bot committed Jun 22, 2020
1 parent b569aa7 commit 902c5c2
Showing 1 changed file with 13 additions and 0 deletions.
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 902c5c2

Please sign in to comment.