aspect-ratio-006.html (1086B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Media Queries Test: min-aspect-ratio - 0.7 ('aspect-ratio' property with prefix 'min')</title> 4 <link rel="author" title="Joel Olsson" href="mailto:joel_1st@hotmail.com"> 5 <link rel="help" title="aspect-ratio" href="https://drafts.csswg.org/mediaqueries-4/#aspect-ratio"> 6 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 7 <meta name="assert" content="The 'aspect-ratio' property with prefix 'min' set '0.7' means that the minimum of ratio is '0.7', 8 only and only if the value of the 'width' to the value of the 'height' is greater than value of 'min-aspect-ratio', the style sheet will be applied. 9 The test runner will run this test in a 800/600 viewport (https://github.com/web-platform-tests/wpt/pull/12695)"> 10 <style> 11 div { 12 background-color: red; 13 height: 100px; 14 width: 100px; 15 } 16 @media screen and (min-aspect-ratio: 0.2) { 17 div { 18 background-color: green; 19 } 20 } 21 </style> 22 <body> 23 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 24 <div></div> 25 </body>