gtk2/tests/reftests/linear-gradient.css
Benjamin Otte 1e08fe8646 reftests: Fix linear-gradient reftest
... and add it to the Makefile
2012-10-31 11:09:12 +01:00

45 lines
1.3 KiB
CSS

@import url("reset-to-defaults.css");
/* One caveat that apply to cairo gradients, and make things therefor
* untestable:
* The start and end points must be identical when drawing
* This means that you cannot:
* ... add extra color stops, even if they'd be invisible
* ... mirror the gradient (ie 'to left, red, green' vs 'to right, green, red')
* ... test a repeating gradient against a non repeating one
* and probably a bunch of other things.
* These things can cause off-by-one rounding errors in pixman (and probably
* your GPU, too) and that'd trigger test failures.
*/
#a {
background-image: linear-gradient(to bottom, blue 0%, green 15px, red 100%);
}
#reference #a {
background-image: linear-gradient(blue, green, red);
}
#b {
background-image: linear-gradient(to left, pink 0, cyan, red 0, green 50%, blue 40px, violet -10em);
}
#reference #b {
background-image: linear-gradient(270deg, red, green, blue);
}
#c {
background-image: linear-gradient(3.5turn, red, green 10px, red 20px, green 30px, red 40px);
}
#reference #c {
background-image: repeating-linear-gradient(to bottom, red, green 10px, red 20px, green 30px, red 40px);
}
#d {
background-image: repeating-linear-gradient(180deg, red, green 10px, red 20px);
}
#reference #d {
background-image: repeating-linear-gradient(to bottom, red, green 10px, red 20px);
}