1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:47:35 +00:00

LibWeb: Support media queries with the resolution feature

The resolution is simply 1dppx * device pixel ratio.

This makes high resolution images show up on https://apple.com/
when running on a high-DPI display. :^)
This commit is contained in:
Andreas Kling 2023-08-25 18:07:11 +02:00
parent b63e393cef
commit da8692572a
3 changed files with 45 additions and 1 deletions

View file

@ -0,0 +1,12 @@
<style>
div { display: none; }
@media (min-resolution: 96dpi) {
div.pass { display: block; }
}
@media (min-resolution: 97dpi) {
div.fail { display: block; }
}
</style>
<p>NOTE: This test assumes that you're running with 1x pixels (which our test runner always does.</p>
<div class="pass">PASS</div>
<div class="fail">FAIL</div>