mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:57:45 +00:00
LibWeb: Check recursively if CSS functions contain var()
or attr()
Previously, `var()` inside functions like `rgb()` wasn't resolved. This will set the background color for badges in the New category on https://ports.serenityos.net. :^)
This commit is contained in:
parent
1072d523e2
commit
a232395b77
2 changed files with 29 additions and 3 deletions
|
@ -45,6 +45,11 @@
|
|||
border: var(--border);
|
||||
}
|
||||
|
||||
.test-inside-a-function {
|
||||
--blue: 255;
|
||||
background-color: rgb(255, 0, var(--blue));
|
||||
}
|
||||
|
||||
.test-mixed {
|
||||
background: var(--background-color) url("background-repeat.png") var(--background-position) no-repeat;
|
||||
}
|
||||
|
@ -178,6 +183,18 @@
|
|||
This should have a 10px solid orange border
|
||||
</div>
|
||||
|
||||
<pre>
|
||||
.test-inside-a-function {
|
||||
--blue: 255;
|
||||
background-color: rgb(255, 0, var(--blue));
|
||||
}
|
||||
</pre>
|
||||
|
||||
<div class="box test-inside-a-function">
|
||||
<pre>.test-inside-a-function</pre>
|
||||
This should be fuchsia
|
||||
</div>
|
||||
|
||||
<h2>Mixed var()</h2>
|
||||
<pre>
|
||||
:root {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue