Find file
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (45 sloc) 2.94 KB
<!DOCTYPE html>
<html lang="en">
<title> — A simple tool to help identify which media queries your device responds to.</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="apple-mobile-web-app-title" content="">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="img/icon.png">
<link rel="stylesheet" href="css/styles.css?v=2">
<script src="js/scripts.js?v=2"></script>
var device_ratio = screen.width + '/' + screen.height;
document.write('<style class="test-styles">@media screen and (device-aspect-ratio: ' + device_ratio + ') {.aspect-ratio-unsupported {display: none;} .aspect-ratio {display: block;}}</style>');
document.write('<style class="test-styles">');
for (var i=mq_step;i<maximumDPI+1;i+=mq_step) {
document.write('@media (min-resolution: ' + (i+1) + 'dpi) and (max-resolution: ' + (i+mq_step) + 'dpi) {');
document.write('#resolution' + i + '{display: list-item}');
document.write('.resolution {display: none;} }');
<script src="//"></script>
<div class="wrapper">
<h1><a href=""></a></h1>
<a href="#" id="view-info" title="More info">?</a>
<h2>A simple tool to help identify which media queries your device responds&nbsp;to.</h2>
<p id="info" class="closed">This test isn’t about what media que&shy;ries your device <a href="" rel="external">can or cannot</a> see (but it does show an 'unsupported' label if a device doesn‘t support something). In&shy;stead it shows you which dimen&shy;sions your de&shy;vice will res&shy;pond to when using ‘width=device-width,initial-scale=1.’</p>
<button id="testButton">Refresh tests <span id="iterations"></span></button>
<h3>Device responds to</h3>
<ul class="nosupport">
<li>Your browser doesn't support media queries :(</li>
<ul id="respondList">
<li id="no_js">JavaScript is turned off or not supported.</li>
<script>document.getElementById('no_js').innerHTML = '';</script>
<h3>User agent</h3>
<div id="useragent"></div>
<p class="footer">Built by <a href="" rel="external">Viljami Salminen</a>. Source code is hosted at <a href="" rel="external">GitHub</a>. Some parts of the tests adop&shy;ted from <a href="" rel="external">Quirks&shy;</a>, <a href="" rel="external">Aspect Ratio Calculator</a> and <a href="" rel="external">BBC’s Device Reporter</a>.</p>