1
Fork 0
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:
Andreas Kling 2023-06-19 13:30:57 +02:00
parent ce2b88e7cc
commit 1b55ff6f4c
3 changed files with 24 additions and 0 deletions

View 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

View 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>