1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:48:12 +00:00

LibWeb: Implement and use OverflowStyleValue

Also added a test page for the `overflow` properties. They apparently
don't work, but at least they do parse.
This commit is contained in:
Sam Atkins 2021-08-09 14:54:40 +01:00 committed by Andreas Kling
parent 168865dbdc
commit e6c0cb5a7f
6 changed files with 268 additions and 2 deletions

View file

@ -0,0 +1,180 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>CSS Overflow Test</title>
<style>
.box {
width: 150px;
height: 150px;
border: 1px solid red;
}
.box h1 {
width: 2000px;
}
.box p {
width: 2000px;
}
</style>
</head>
<body>
<h1>Single-value 'overflow' property</h1>
<h2>Overflow: inherit</h2>
<div class="box" style="overflow: inherit;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
<h2>Overflow: initial</h2>
<div class="box" style="overflow: initial;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
<h2>Overflow: auto</h2>
<div class="box" style="overflow: auto;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
<h2>Overflow: clip</h2>
<div class="box" style="overflow: clip;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
<h2>Overflow: hidden</h2>
<div class="box" style="overflow: hidden;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
<h2>Overflow: scroll</h2>
<div class="box" style="overflow: scroll;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
<h2>Overflow: visible</h2>
<div class="box" style="overflow: visible;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
<h1>Two-value 'overflow' property</h1>
<h2>Overflow: auto hidden</h2>
<div class="box" style="overflow: auto hidden;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
<h2>Overflow: hidden auto</h2>
<div class="box" style="overflow: hidden auto;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
<h2>Overflow: scroll clip</h2>
<div class="box" style="overflow: scroll clip;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
<h2>Overflow: clip scroll</h2>
<div class="box" style="overflow: clip scroll;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
<h2>Overflow: visible hidden</h2>
<div class="box" style="overflow: visible hidden;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
<h1>Separate 'overflow-x' / 'overflow-y' property</h1>
<h2>overflow-x: auto, overflow-y: hidden</h2>
<div class="box" style="overflow-x: auto; overflow-y: hidden;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
<h2>overflow-x: hidden, overflow-y: auto</h2>
<div class="box" style="overflow-x: hidden; overflow-y: auto;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
<h2>overflow-x: scroll, overflow-y: clip</h2>
<div class="box" style="overflow-x: scroll; overflow-y: clip;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
<h2>overflow-y: scroll</h2>
<div class="box" style="overflow-y: scroll;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
<h2>overflow-x: visible</h2>
<div class="box" style="overflow-x: visible;">
<h1>Heading extends outside the box!</h1>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
<p>Hello this is some text</p>
</div>
</body>
</html>