mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:07:46 +00:00
LibWeb: Support justify-content: space-evenly
in flex layouts
Aligns the cookie banner correctly on https://twitter.com/ :^)
This commit is contained in:
parent
4474aa0ae5
commit
1177308afb
7 changed files with 820 additions and 104 deletions
|
@ -21,6 +21,7 @@
|
|||
.center { justify-content: center; }
|
||||
.space-around { justify-content: space-around; }
|
||||
.space-between { justify-content: space-between; }
|
||||
.space-evenly { justify-content: space-evenly; }
|
||||
|
||||
.row { flex-direction: row; }
|
||||
.row.reverse { flex-direction: row-reverse; }
|
||||
|
@ -38,6 +39,7 @@
|
|||
<div class="row outer center"><div>center</div></div>
|
||||
<div class="row outer space-around"><div>space-around</div></div>
|
||||
<div class="row outer space-between"><div>space-between</div></div>
|
||||
<div class="row outer space-evenly"><div>space-evenly</div></div>
|
||||
<div class="row reverse outer start"><div>start</div></div>
|
||||
<div class="row reverse outer flex-start"><div>flex-start</div></div>
|
||||
<div class="row reverse outer end"><div>end</div></div>
|
||||
|
@ -45,6 +47,7 @@
|
|||
<div class="row reverse outer center"><div>center</div></div>
|
||||
<div class="row reverse outer space-around"><div>space-around</div></div>
|
||||
<div class="row reverse outer space-between"><div>space-between</div></div>
|
||||
<div class="row reverse outer space-evenly"><div>space-evenly</div></div>
|
||||
<div class="column outer start"><div>start</div></div>
|
||||
<div class="column outer flex-start"><div>flex-start</div></div>
|
||||
<div class="column outer end"><div>end</div></div>
|
||||
|
@ -52,6 +55,7 @@
|
|||
<div class="column outer center"><div>center</div></div>
|
||||
<div class="column outer space-around"><div>space-around</div></div>
|
||||
<div class="column outer space-between"><div>space-between</div></div>
|
||||
<div class="column outer space-evenly"><div>space-evenly</div></div>
|
||||
<div class="column reverse outer start"><div>start</div></div>
|
||||
<div class="column reverse outer flex-start"><div>flex-start</div></div>
|
||||
<div class="column reverse outer end"><div>end</div></div>
|
||||
|
@ -59,3 +63,4 @@
|
|||
<div class="column reverse outer center"><div>center</div></div>
|
||||
<div class="column reverse outer space-around"><div>space-around</div></div>
|
||||
<div class="column reverse outer space-between"><div>space-between</div></div>
|
||||
<div class="column reverse outer space-evenly"><div>space-evenly</div></div>
|
||||
|
|
71
Tests/LibWeb/Layout/input/flex/justify-content-1.html
Normal file
71
Tests/LibWeb/Layout/input/flex/justify-content-1.html
Normal file
|
@ -0,0 +1,71 @@
|
|||
<!DOCTYPE html><style>
|
||||
* {
|
||||
border: 1px solid black !important;
|
||||
}
|
||||
.outer {
|
||||
display: flex;
|
||||
background: wheat;
|
||||
}
|
||||
.outer.row {
|
||||
width: 300px;
|
||||
height: 60px;
|
||||
}
|
||||
.outer.column {
|
||||
width: 60px;
|
||||
height: 300px;
|
||||
}
|
||||
.outer > div {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: orange;
|
||||
}
|
||||
.flex-start { justify-content: flex-start; }
|
||||
.flex-end { justify-content: flex-end; }
|
||||
.start { justify-content: start; }
|
||||
.end { justify-content: end; }
|
||||
.center { justify-content: center; }
|
||||
.space-around { justify-content: space-around; }
|
||||
.space-between { justify-content: space-between; }
|
||||
.space-evenly { justify-content: space-evenly; }
|
||||
|
||||
.row { flex-direction: row; }
|
||||
.row.reverse { flex-direction: row-reverse; }
|
||||
.column { flex-direction: column; }
|
||||
.column.reverse { flex-direction: column-reverse; }
|
||||
.reverse > div {
|
||||
background: magenta;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div class="row outer start"><div>start</div><div>a</div><div>b</div></div>
|
||||
<div class="row outer flex-start"><div>flex-start</div><div>a</div><div>b</div></div>
|
||||
<div class="row outer end"><div>end</div><div>a</div><div>b</div></div>
|
||||
<div class="row outer flex-end"><div>flex-end</div><div>a</div><div>b</div></div>
|
||||
<div class="row outer center"><div>center</div><div>a</div><div>b</div></div>
|
||||
<div class="row outer space-around"><div>space-around</div><div>a</div><div>b</div></div>
|
||||
<div class="row outer space-between"><div>space-between</div><div>a</div><div>b</div></div>
|
||||
<div class="row outer space-evenly"><div>space-evenly</div><div>a</div><div>b</div></div>
|
||||
<div class="row reverse outer start"><div>start</div><div>a</div><div>b</div></div>
|
||||
<div class="row reverse outer flex-start"><div>flex-start</div><div>a</div><div>b</div></div>
|
||||
<div class="row reverse outer end"><div>end</div><div>a</div><div>b</div></div>
|
||||
<div class="row reverse outer flex-end"><div>flex-end</div><div>a</div><div>b</div></div>
|
||||
<div class="row reverse outer center"><div>center</div><div>a</div><div>b</div></div>
|
||||
<div class="row reverse outer space-around"><div>space-around</div><div>a</div><div>b</div></div>
|
||||
<div class="row reverse outer space-between"><div>space-between</div><div>a</div><div>b</div></div>
|
||||
<div class="row reverse outer space-evenly"><div>space-evenly</div><div>a</div><div>b</div></div>
|
||||
<div class="column outer start"><div>start</div><div>a</div><div>b</div></div>
|
||||
<div class="column outer flex-start"><div>flex-start</div><div>a</div><div>b</div></div>
|
||||
<div class="column outer end"><div>end</div><div>a</div><div>b</div></div>
|
||||
<div class="column outer flex-end"><div>flex-end</div><div>a</div><div>b</div></div>
|
||||
<div class="column outer center"><div>center</div><div>a</div><div>b</div></div>
|
||||
<div class="column outer space-around"><div>space-around</div><div>a</div><div>b</div></div>
|
||||
<div class="column outer space-between"><div>space-between</div><div>a</div><div>b</div></div>
|
||||
<div class="column outer space-evenly"><div>space-evenly</div><div>a</div><div>b</div></div>
|
||||
<div class="column reverse outer start"><div>start</div><div>a</div><div>b</div></div>
|
||||
<div class="column reverse outer flex-start"><div>flex-start</div><div>a</div><div>b</div></div>
|
||||
<div class="column reverse outer end"><div>end</div><div>a</div><div>b</div></div>
|
||||
<div class="column reverse outer flex-end"><div>flex-end</div><div>a</div><div>b</div></div>
|
||||
<div class="column reverse outer center"><div>center</div><div>a</div><div>b</div></div>
|
||||
<div class="column reverse outer space-around"><div>space-around</div><div>a</div><div>b</div></div>
|
||||
<div class="column reverse outer space-between"><div>space-between</div><div>a</div><div>b</div></div>
|
||||
<div class="column reverse outer space-evenly"><div>space-evenly</div><div>a</div><div>b</div></div>
|
Loading…
Add table
Add a link
Reference in a new issue