Skip to content

Commit

Permalink
Tests/LibWeb: Add outer box-shadow ref test
Browse files Browse the repository at this point in the history
This is a screenshot test based on a cut-down version of the box-shadow
demo page.
  • Loading branch information
MacDue authored and kalenikaliaksandr committed Oct 22, 2023
1 parent 4936695 commit 8eab448
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
75 changes: 75 additions & 0 deletions Tests/LibWeb/Ref/outer-box-shadow.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<html>
<link rel="match" href="reference/outer-box-shadow-ref.html" />
<head>
<style>
.box {
border: 1px solid black;
height: 100px;
width: 100px;
margin: 50px;
}

#with-bg {
background-image: linear-gradient(to right, red, blue, cyan, yellow, green);

width: 240px;
padding-top: 60px;
}

.cmy {
box-shadow: 20px 10px 5px magenta, cyan -20px -10px 5px, yellow 10px -5px 5px 20px;
}

body {
background-color: white;
}
</style>
</head>
<body>
<div id="no-bg">
<div class="box cmy" style="border-radius: 50%;">
</div>
<div class="box cmy" style="border-radius: 80% 15% 55% 50% / 55% 15% 80% 50%;">
</div>
<div class="box cmy" style="border-radius: 20px;">
</div>
<div class="box" style="box-shadow: magenta -40px -20px; border-radius: 30%;">
</div>
<div class="box cmy">
</div>
<div class="box" style="box-shadow: 20px 10px 5px magenta">
</div>
<div class="box" style="box-shadow: 20px 10px magenta">
</div>
<div class="box" style="box-shadow: magenta -40px -20px">
</div>
<div class="box" style="box-shadow: 20px 10px rgba(255,0,255,0.5)">
</div>
<div class="box" style="box-shadow: -40px -20px rgba(255,0,255,0.5)">
</div>
</div>
<div id="with-bg">
<div class="box cmy" style="border-radius: 50%;">
</div>
<div class="box cmy" style="border-radius: 80% 15% 55% 50% / 55% 15% 80% 50%;">
</div>
<div class="box cmy" style="border-radius: 20px;">
</div>
<div class="box" style="box-shadow: magenta -40px -20px; border-radius: 30%;">
</div>
<div class="box cmy">
</div>
<div class="box" style="box-shadow: 20px 10px 5px magenta">
</div>
<div class="box" style="box-shadow: 20px 10px magenta">
</div>
<div class="box" style="box-shadow: magenta -40px -20px">
</div>
<div class="box" style="box-shadow: 20px 10px rgba(255,0,255,0.5)">
</div>
<div class="box" style="box-shadow: -40px -20px rgba(255,0,255,0.5)">
</div>
</div>
</body>

</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions Tests/LibWeb/Ref/reference/outer-box-shadow-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<style>
* {
margin: 0;
}
body {
background-color: white;
}
</style>
<!-- To rebase:
1. Open outer-box-shadow.html in Ladybird
2. Resize the window just above the width of the largest element
3. Right click > "Take Full Screenshot"
4. Update the image below:
-->
<img src="./images/outer-box-shadow-ref.png">

0 comments on commit 8eab448

Please sign in to comment.