Add some tests for radial gradient parsing

These are the examples from the CSS spec.
This commit is contained in:
Matthias Clasen 2015-12-27 02:04:20 -05:00
parent f727ee5687
commit fcea12f790
3 changed files with 80 additions and 0 deletions

View File

@ -405,6 +405,8 @@ test_data = \
pseudo-classes-unknown.css \
pseudo-classes-unknown.errors \
pseudo-classes-unknown.ref.css \
radial.css \
radial.ref.css \
selector.css \
selector.ref.css \
shadow.css \

View File

@ -0,0 +1,39 @@
a {
background-image: radial-gradient(yellow, green);
}
b {
background-image: radial-gradient(ellipse at center, yellow 0%, green 100%);
}
c {
background-image: radial-gradient(farthest-corner at 50% 50%, yellow, green);
}
d {
background-image: radial-gradient(circle, yellow, green);
}
e {
background-image: radial-gradient(red, yellow, green);
}
f {
background-image: radial-gradient(farthest-side at left bottom, red, yellow 50px, green);
}
g {
background-image: radial-gradient(closest-side at 20px 30px, red, yellow, green);
}
h {
background-image: radial-gradient(20px 30px at 20px 30px, red, yellow, green);
}
i {
background-image: radial-gradient(closest-side circle at 20px 30px, red, yellow, green);
}
j {
background-image: radial-gradient(20px 20px at 20px 30px, red, yellow, green);
}

View File

@ -0,0 +1,39 @@
a {
background-image: radial-gradient(circle farthest-corner at center, rgb(255,255,0), rgb(0,128,0));
}
b {
background-image: radial-gradient(ellipse farthest-corner at center, rgb(255,255,0) 0, rgb(0,128,0) 100%);
}
c {
background-image: radial-gradient(circle farthest-corner at center, rgb(255,255,0), rgb(0,128,0));
}
d {
background-image: radial-gradient(circle farthest-corner at center, rgb(255,255,0), rgb(0,128,0));
}
e {
background-image: radial-gradient(circle farthest-corner at center, rgb(255,0,0), rgb(255,255,0), rgb(0,128,0));
}
f {
background-image: radial-gradient(circle farthest-side at left bottom, rgb(255,0,0), rgb(255,255,0) 50px, rgb(0,128,0));
}
g {
background-image: radial-gradient(circle closest-side at 20px 30px, rgb(255,0,0), rgb(255,255,0), rgb(0,128,0));
}
h {
background-image: radial-gradient(ellipse 20px 30px at 20px 30px, rgb(255,0,0), rgb(255,255,0), rgb(0,128,0));
}
i {
background-image: radial-gradient(circle closest-side at 20px 30px, rgb(255,0,0), rgb(255,255,0), rgb(0,128,0));
}
j {
background-image: radial-gradient(ellipse 20px 20px at 20px 30px, rgb(255,0,0), rgb(255,255,0), rgb(0,128,0));
}