mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:37:34 +00:00
LibWeb: Improve justify-content in abspos static position of flex child
Also, add a test so we know these actually work correctly now. :^)
This commit is contained in:
parent
859ac200b7
commit
80a734d42e
3 changed files with 300 additions and 28 deletions
|
@ -0,0 +1,61 @@
|
|||
<!DOCTYPE html><style>
|
||||
* {
|
||||
border: 1px solid black !important;
|
||||
}
|
||||
.outer {
|
||||
display: flex;
|
||||
width: 300px;
|
||||
height: 60px;
|
||||
background: wheat;
|
||||
}
|
||||
.outer > div {
|
||||
position: absolute;
|
||||
width: 150px;
|
||||
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; }
|
||||
|
||||
.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>
|
||||
<div class="row outer flex-start"><div>flex-start</div></div>
|
||||
<div class="row outer end"><div>end</div></div>
|
||||
<div class="row outer flex-end"><div>flex-end</div></div>
|
||||
<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 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>
|
||||
<div class="row reverse outer flex-end"><div>flex-end</div></div>
|
||||
<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="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>
|
||||
<div class="column outer flex-end"><div>flex-end</div></div>
|
||||
<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 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>
|
||||
<div class="column reverse outer flex-end"><div>flex-end</div></div>
|
||||
<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>
|
Loading…
Add table
Add a link
Reference in a new issue