mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
LibWeb: Expand CSS var() inside calc() paren blocks
Before this change, this var() would get expanded: calc(10px * var(--one)) But this one would not: calc(10px * (var(--one))
This commit is contained in:
parent
ce2b88e7cc
commit
1b55ff6f4c
3 changed files with 24 additions and 0 deletions
4
Tests/LibWeb/Layout/expected/css-var-in-calc-block.txt
Normal file
4
Tests/LibWeb/Layout/expected/css-var-in-calc-block.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (1,1) content-size 798x270 [BFC] children: not-inline
|
||||
BlockContainer <body> at (10,10) content-size 780x252 children: not-inline
|
||||
BlockContainer <div> at (11,11) content-size 250x250 children: not-inline
|
10
Tests/LibWeb/Layout/input/css-var-in-calc-block.html
Normal file
10
Tests/LibWeb/Layout/input/css-var-in-calc-block.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!doctype html><style>
|
||||
* {
|
||||
border: 1px solid black;
|
||||
}
|
||||
div {
|
||||
--five: 5;
|
||||
width: calc(50px * (var(--five)));
|
||||
height: calc(50px * (0 + var(--five)));
|
||||
}
|
||||
</style><div>
|
Loading…
Add table
Add a link
Reference in a new issue