mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:57:35 +00:00
LibWeb: Unit tests for min/max-inline-size
This commit is contained in:
parent
733b74af7c
commit
f60446bbfe
2 changed files with 45 additions and 0 deletions
20
Tests/LibWeb/Layout/expected/inline-size.txt
Normal file
20
Tests/LibWeb/Layout/expected/inline-size.txt
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||||
|
BlockContainer <html> at (0,0) content-size 800x570.851562 [BFC] children: not-inline
|
||||||
|
BlockContainer <body> at (8,70) content-size 784x492.851562 children: not-inline
|
||||||
|
BlockContainer <p.min-inline-test> at (8,70) content-size 784x200 children: inline
|
||||||
|
line 0 width: 85.859375, height: 76.425781, bottom: 76.425781, baseline: 59.199218
|
||||||
|
frag 0 from TextNode start: 0, length: 2, rect: [8,70 85.859375x76.425781]
|
||||||
|
"KK"
|
||||||
|
TextNode <#text>
|
||||||
|
BlockContainer <(anonymous)> at (8,340) content-size 784x76.425781 children: inline
|
||||||
|
line 0 width: 0, height: 76.425781, bottom: 76.425781, baseline: 59.199218
|
||||||
|
TextNode <#text>
|
||||||
|
BreakNode <br>
|
||||||
|
TextNode <#text>
|
||||||
|
BlockContainer <p.max-inline-test> at (8,486.425781) content-size 100x76.425781 children: inline
|
||||||
|
line 0 width: 85.859375, height: 76.425781, bottom: 76.425781, baseline: 59.199218
|
||||||
|
frag 0 from TextNode start: 0, length: 2, rect: [8,486.425781 85.859375x76.425781]
|
||||||
|
"KK"
|
||||||
|
TextNode <#text>
|
||||||
|
BlockContainer <(anonymous)> at (8,632.851562) content-size 784x0 children: inline
|
||||||
|
TextNode <#text>
|
25
Tests/LibWeb/Layout/input/inline-size.html
Normal file
25
Tests/LibWeb/Layout/input/inline-size.html
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
font: 70px SerenitySans;
|
||||||
|
}
|
||||||
|
.min-inline-test {
|
||||||
|
background: red;
|
||||||
|
min-width: 400px;
|
||||||
|
min-height: 200px;
|
||||||
|
|
||||||
|
min-inline-size: 700px;
|
||||||
|
writing-mode: horizontal-tb;
|
||||||
|
}
|
||||||
|
.max-inline-test {
|
||||||
|
background: blue;
|
||||||
|
max-width: 400px;
|
||||||
|
max-height: 200px;
|
||||||
|
|
||||||
|
max-inline-size: 100px;
|
||||||
|
writing-mode: horizontal-tb;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<p class="min-inline-test">KK</p>
|
||||||
|
<br>
|
||||||
|
<p class="max-inline-test">KK</p>
|
Loading…
Add table
Add a link
Reference in a new issue