|
16 | 16 | Assert.areEqual(1, result.messages[0].line);
|
17 | 17 | },
|
18 | 18 |
|
19 |
| - "Using -webkit-transition and -moz-transition should warn to also include -o-transition and -ms-transition.": function(){ |
| 19 | + "Using -webkit-transition and -moz-transition should warn to also include -o-transition.": function() { |
20 | 20 | var result = CSSLint.verify("h1 { -webkit-transition: height 20px 1s; -moz-transition: height 20px 1s; }", { "compatible-vendor-prefixes": 1 });
|
21 |
| - Assert.areEqual(2, result.messages.length); |
| 21 | + Assert.areEqual(1, result.messages.length); |
22 | 22 | Assert.areEqual("warning", result.messages[0].type);
|
23 | 23 | Assert.areEqual("The property -o-transition is compatible with -webkit-transition and -moz-transition and should be included as well.", result.messages[0].message);
|
24 | 24 | Assert.areEqual(6, result.messages[0].col);
|
25 |
| - Assert.areEqual(1, result.messages[0].line); |
26 |
| - Assert.areEqual("warning", result.messages[1].type); |
27 |
| - Assert.areEqual("The property -ms-transition is compatible with -webkit-transition and -moz-transition and should be included as well.", result.messages[1].message); |
28 |
| - Assert.areEqual(6, result.messages[1].col); |
29 |
| - Assert.areEqual(1, result.messages[1].line); |
30 |
| - |
| 25 | + Assert.areEqual(1, result.messages[0].line); |
31 | 26 | },
|
32 | 27 |
|
33 |
| - "Using -webkit-transform should warn to also include -moz-transform, -ms-transform, and -o-transform.": function(){ |
| 28 | + "Using -webkit-transform should warn to also include -moz-transform, -ms-transform, and -o-transform.": function() { |
34 | 29 | var result = CSSLint.verify("div.box { -webkit-transform: translate(50px, 100px); }", { "compatible-vendor-prefixes": 3 });
|
35 | 30 | Assert.areEqual(3, result.messages.length);
|
36 | 31 | Assert.areEqual("warning", result.messages[0].type);
|
|
41 | 36 | Assert.areEqual("The property -o-transform is compatible with -webkit-transform and should be included as well.", result.messages[2].message);
|
42 | 37 | },
|
43 | 38 |
|
| 39 | + "Using -webkit-transform inside of an @-webkit- block shouldn't cause a warning": function(){ |
| 40 | + var result = CSSLint.verify("@-webkit-keyframes spin {0%{ -webkit-transform: rotateX(-10deg) rotateY(0deg); } 100%{ -webkit-transform: rotateX(-10deg) rotateY(-360deg); } }", { "compatible-vendor-prefixes": 1 }); |
| 41 | + Assert.areEqual(0, result.messages.length); |
| 42 | + }, |
| 43 | + |
44 | 44 | "Using all compatible vendor prefixes for animation should be allowed with no warnings.": function(){
|
45 |
| - var result = CSSLint.verify(".next:focus { -moz-animation: 'diagonal-slide' 5s 10; -webkit-animation: 'diagonal-slide' 5s 10; -ms-animation: 'diagonal-slide' 5s 10; }", { "compatible-vendor-prefixes": 0 }); |
| 45 | + var result = CSSLint.verify(".next:focus { -moz-animation: 'diagonal-slide' 5s 10; -webkit-animation: 'diagonal-slide' 5s 10; -ms-animation: 'diagonal-slide' 5s 10; }", { "compatible-vendor-prefixes": 1 }); |
46 | 46 | Assert.areEqual(0, result.messages.length);
|
47 | 47 | },
|
48 | 48 |
|
49 | 49 | "Using box-shadow with no vendor prefixes should be allowed with no warnings.": function(){
|
50 |
| - var result = CSSLint.verify("h1 { box-shadow: 5px 5px 5px #ccc; }", { "compatible-vendor-prefixes": 0 }); |
| 50 | + var result = CSSLint.verify("h1 { box-shadow: 5px 5px 5px #ccc; }", { "compatible-vendor-prefixes": 1 }); |
51 | 51 | Assert.areEqual(0, result.messages.length);
|
52 | 52 | }
|
53 | 53 |
|
|
0 commit comments