mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
LibWeb: Parse calc() function in grid sizes
Adds missing part of grid size parsing function to handle calc().
This commit is contained in:
parent
7fee05e18c
commit
c2f6ba8f5f
4 changed files with 42 additions and 2 deletions
11
Tests/LibWeb/Layout/expected/grid/calc-track-size.txt
Normal file
11
Tests/LibWeb/Layout/expected/grid/calc-track-size.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x17.46875 children: not-inline
|
||||
Box <div.grid-container> at (8,8) content-size 784x17.46875 [GFC] children: not-inline
|
||||
BlockContainer <div.grid-item> at (8,8) content-size 200x17.46875 [BFC] children: inline
|
||||
line 0 width: 31.265625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 3, rect: [8,8 31.265625x17.46875]
|
||||
"Uno"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (8,25.46875) content-size 784x0 children: inline
|
||||
TextNode <#text>
|
12
Tests/LibWeb/Layout/input/grid/calc-track-size.html
Normal file
12
Tests/LibWeb/Layout/input/grid/calc-track-size.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<style>
|
||||
.grid-container {
|
||||
display: grid;
|
||||
grid-template-columns: calc(200px);
|
||||
grid-template-rows: auto;
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
background-color: lightskyblue;
|
||||
}
|
||||
</style>
|
||||
<div class="grid-container"><div class="grid-item">Uno</div></div>
|
Loading…
Add table
Add a link
Reference in a new issue