mq_print_aspectratio.xhtml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?xml version="1.0" encoding="iso-8859-1" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-print">
  4. <head>
  5. <title>Media Query - Print mode test - aspect-ratio</title>
  6. <style type="text/css"><![CDATA[
  7. p {height: 10px; width: 100px; color: yellow; }
  8. @media print { .a { color: aqua; } }
  9. @media screen { .b { color: aqua; } }
  10. /* not sure if the 3/5 will work as aspect ratio is width/height */
  11. @media (aspect-ratio: 5/3) { .c { color: aqua; } } /* y */
  12. @media (aspect-ratio: 10/6) { .d { color: aqua; } } /* y */
  13. @media (aspect-ratio: 15/9) { .e { color: aqua; } } /* y */
  14. @media print and (aspect-ratio: 5/3) { .f {color: aqua; } } /* y */
  15. @media print and (aspect-ratio: 10/6) { .g {color: aqua; } }/* y */
  16. @media print and (aspect-ratio: 15/9) { .h {color: aqua; } }/* y */
  17. @media all and (aspect-ratio: 5/3) { .i { color: aqua; } } /* y */
  18. /* negative cases */
  19. @media all and (aspect-ratio: 3/2) { .j { color: aqua; } } /* n */
  20. @media (aspect-ratio: 4/3) { .k { color: aqua; } } /* n */
  21. @media (aspect-ratio: 3/4) { .l { color: aqua; } } /* n */
  22. @media (aspect-ratio: 16/9) { .m { color: aqua; } } /* n */
  23. @media screen and (aspect-ratio: 5/3) { .n {color: aqua; } } /* n */
  24. @media screen and (aspect-ratio: 10/6) { .o {color: aqua; } } /* n */
  25. @media screen and (aspect-ratio: 15/9) { .p {color: aqua; } } /* n */
  26. ]]></style>
  27. </head>
  28. <body>
  29. <p class="a">a</p>
  30. <p class="b">b</p>
  31. <p class="c">c</p>
  32. <p class="d">d</p>
  33. <p class="e">e</p>
  34. <p class="f">f</p>
  35. <p class="g">g</p>
  36. <p class="h">h</p>
  37. <p class="i">i</p>
  38. <p class="j">j</p>
  39. <p class="k">k</p>
  40. <p class="l">l</p>
  41. <p class="m">m</p>
  42. <p class="n">n</p>
  43. <p class="o">o</p>
  44. <p class="p">p</p>
  45. </body>
  46. </html>