aspect-ratio-005.html (1071B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Media Queries Test: max-aspect-ratio - 1280.1/720.01 ('aspect-ratio' property with prefix 'max')</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 'max' set 1280.1/720.01. Only and only if the value of the 'width' 8 to the value of the 'height' is lower than value of 'max-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 (max-aspect-ratio: 1280.1/720.01) { 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>