1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 21:15:07 +00:00
serenity/Tests/LibWeb/Layout/input/flex/calc-flex-basis.html
Andreas Kling 2e13f65ff4 LibWeb: Support flex-basis: calc(...)
1. Propagate calc() values from StyleProperties to ComputedValues.
2. Actually resolve calc() values when determining the used flex basis.

This makes the "support" section on https://shopify.com/ show up
correctly as a 2x2 grid (instead of 1x4). :^)
2023-05-17 07:40:17 +02:00

18 lines
No EOL
490 B
HTML

<!doctype html><style>
* {
border: 1px solid black;
box-sizing: border-box;
font: 20px SerenitySans;
}
.flex-container {
display: flex;
flex-wrap: wrap;
background: pink;
column-gap: 1px;
}
.flex-item {
flex-basis: calc(50% - 1px);
background: orange;
height: 30px;
}
</style><div class="flex-container"><div class="flex-item">Item 1</div><div class="flex-item">Item 2</div><div class="flex-item">Item 3</div><div class="flex-item">Item 4</div></div>