Tests/LibWeb: Add two tests for lh and rlh units

This commit is contained in:
Simon Wanner 2023-03-17 23:27:15 +01:00 committed by Andreas Kling
parent 554c4af90f
commit 482fa2d4e2
Notes: sideshowbarker 2024-07-17 05:18:58 +09:00
4 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,6 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x116 children: not-inline
BlockContainer <body> at (8,8) content-size 784x100 children: not-inline
BlockContainer <div#a> at (8,8) content-size 100x100 children: not-inline
BlockContainer <div#b> at (8,8) content-size 100x100 children: inline
TextNode <#text>

View File

@ -0,0 +1,6 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x116 children: not-inline
BlockContainer <body> at (8,8) content-size 784x100 children: not-inline
BlockContainer <div#a> at (8,8) content-size 100x100 children: not-inline
BlockContainer <div#b> at (8,8) content-size 100x100 children: inline
TextNode <#text>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<head><style>
* {
font-family: SerenitySans;
}
:root {
font-size: 20px;
line-height: 2;
}
#a {
background-color: red;
width: 100px;
height: 100px;
}
#b {
background-color: green;
font-size: 50px;
line-height: 100%;
width: 2lh;
height: 2.5rlh;
}
</style>
<body><div id="a"><div id="b">

View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<head><style>
* {
font-family: SerenitySans;
}
:root {
font-size: 20px;
line-height: 2;
}
#a {
background-color: red;
width: 100px;
height: 100px;
}
#b {
background-color: green;
line-height: 50px;
width: 2lh;
height: 2.5rlh;
}
</style>
<body><div id="a"><div id="b">