summaryrefslogtreecommitdiff
path: root/tests/reftests/linear-gradient.css
blob: ccb50d6f2d2bc26ac238df98317842cf02f6203a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@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, lime' 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%, lime 15px, red 100%);
}

#reference #a {
  background-image: linear-gradient(blue, lime, red);
}

#b {
  background-image: linear-gradient(to left, pink 0, cyan, red 0, lime 50%, blue 40px, violet -10em);
}

#reference #b {
  background-image: linear-gradient(270deg, red, lime, blue);
}

#c {
  background-image: linear-gradient(3.5turn, red, red 10px, lime 10px, lime 20px, red 20px, red 30px, lime 30px, lime 40px, red 40px);
}

#reference #c {
  background-image: repeating-linear-gradient(to bottom, red, red 10px, lime 10px, lime 20px, red 20px);
}

#d {
    background-image: repeating-linear-gradient(180deg, red, lime 10px, red 20px);
}

#reference #d {
    background-image: repeating-linear-gradient(to bottom, red, lime 10px, red 20px);
}