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:
parent
b63e393cef
commit
da8692572a
3 changed files with 45 additions and 1 deletions
12
Tests/LibWeb/Layout/input/media-query-resolution.html
Normal file
12
Tests/LibWeb/Layout/input/media-query-resolution.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue