mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:47:35 +00:00
LibWeb: Allow any valid <color>
in CSS gradients
We now keep the color value as a StyleValue up until we go to paint the gradient, which makes `currentColor` work, along with any other color values that can't be immediately converted into a `Gfx::Color` while parsing.
This commit is contained in:
parent
2971ae59d8
commit
631a988a57
13 changed files with 53 additions and 28 deletions
10
Tests/LibWeb/Ref/css-gradient-currentcolor-ref.html
Normal file
10
Tests/LibWeb/Ref/css-gradient-currentcolor-ref.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<html>
|
||||
<style>
|
||||
div {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background: linear-gradient(green, white);
|
||||
}
|
||||
</style>
|
||||
<div></div>
|
||||
</html>
|
11
Tests/LibWeb/Ref/css-gradient-currentcolor.html
Normal file
11
Tests/LibWeb/Ref/css-gradient-currentcolor.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<html>
|
||||
<style>
|
||||
div {
|
||||
color: green;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background: linear-gradient(currentColor, white);
|
||||
}
|
||||
</style>
|
||||
<div></div>
|
||||
</html>
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"square-flex.html": "square-ref.html",
|
||||
"separate-borders-inline-table.html": "separate-borders-ref.html",
|
||||
"opacity-stacking.html": "opacity-stacking-ref.html"
|
||||
"opacity-stacking.html": "opacity-stacking-ref.html",
|
||||
"css-gradient-currentcolor.html": "css-gradient-currentcolor-ref.html"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue