mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
Tests: Add CSS image-set resolution reftest
Cover image-set() candidate selection by resolution for background images. The tests cover both source-order-independent selection and calculated resolution descriptors that require layout context.
This commit is contained in:
committed by
Andreas Kling
parent
a226d778e6
commit
0105d56e6c
Notes:
github-actions[bot]
2026-04-25 12:55:19 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/0105d56e6c5 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/9090
@@ -0,0 +1,14 @@
|
||||
<!doctype html>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<div class="box"></div>
|
||||
@@ -0,0 +1,14 @@
|
||||
<!doctype html>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: red;
|
||||
}
|
||||
</style>
|
||||
<div class="box"></div>
|
||||
@@ -0,0 +1,19 @@
|
||||
<!doctype html>
|
||||
<link rel="match" href="../expected/css-image-set-background-calc-resolution-ref.html" />
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-image: image-set(
|
||||
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Crect width='1' height='1' fill='green'/%3E%3C/svg%3E") calc(1dppx * sign(10px)),
|
||||
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Crect width='1' height='1' fill='red'/%3E%3C/svg%3E") 2x
|
||||
);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
</style>
|
||||
<div class="box"></div>
|
||||
@@ -0,0 +1,19 @@
|
||||
<!doctype html>
|
||||
<link rel="match" href="../expected/css-image-set-background-resolution-ref.html" />
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-image: image-set(
|
||||
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Crect width='1' height='1' fill='green'/%3E%3C/svg%3E") 2x,
|
||||
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Crect width='1' height='1' fill='red'/%3E%3C/svg%3E") 1x
|
||||
);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
</style>
|
||||
<div class="box"></div>
|
||||
Reference in New Issue
Block a user