@@ -26,30 +26,40 @@ testRule({
2626 } ,
2727 {
2828 code : '.foo { transition: all; @media (prefers-reduced-motion: reduce) { transition: none; } }'
29+ } ,
30+ {
31+ code : '.foo { transition: all 5s; color: red; } @media screen and (prefers-reduced-motion: reduce) { .foo { transition: none } }'
2932 }
3033 ] ,
3134
3235 reject : [
3336 {
3437 code : 'a { animation-name: skew; }' ,
3538 fixed :
36- '@media screen and (prefers-reduced-motion: reduce) {\na { animation: none;\n}\n}\na { animation-name: skew; }' ,
39+ 'a { animation-name: skew; }\n @media screen and (prefers-reduced-motion: reduce) {\na { animation: none;\n}\n}' ,
3740 message : messages . expected ( 'a' ) ,
3841 line : 1 ,
3942 column : 3
4043 } ,
4144 {
4245 code : 'a { animation-name: skew; } @media screen and (prefers-reduced-motion) { a { transition: none; } }' ,
4346 fixed :
44- '@media screen and (prefers-reduced-motion: reduce) {\na { animation: none;\n}\n} a { animation-name: skew; } @media screen and (prefers-reduced-motion) { a { transition: none; } }' ,
47+ 'a { animation-name: skew; }\n @media screen and (prefers-reduced-motion: reduce) {\na { animation: none;\n}\n} @media screen and (prefers-reduced-motion) { a { transition: none; } }' ,
4548 message : messages . expected ( 'a' ) ,
4649 line : 1 ,
4750 column : 3
4851 } ,
4952 {
5053 code : '.foo { animation: 1s ease-in; } @media screen and (prefers-reduced-motion) { .foo { animation: 1s ease-in; } }' ,
5154 fixed :
52- '@media screen and (prefers-reduced-motion: reduce) {\n.foo { animation: none;\n}\n} .foo { animation: 1s ease-in; } @media screen and (prefers-reduced-motion) { .foo { animation: 1s ease-in; } }' ,
55+ '.foo { animation: 1s ease-in; }\n@media screen and (prefers-reduced-motion: reduce) {\n.foo { animation: none;\n}\n} @media screen and (prefers-reduced-motion) { .foo { animation: 1s ease-in; } }' ,
56+ message : messages . expected ( '.foo' ) ,
57+ line : 1 ,
58+ column : 3
59+ } ,
60+ {
61+ code : '.foo { transition: all 5s; color: red; }' ,
62+ fixed : '.foo { transition: all 5s; color: red; }\n@media screen and (prefers-reduced-motion: reduce) {\n.foo { transition: none;\n}\n}' ,
5363 message : messages . expected ( '.foo' ) ,
5464 line : 1 ,
5565 column : 3
0 commit comments