@@ -211,8 +211,8 @@ var tests = [
211211 } ,
212212 {
213213 should : 'localize keyframes' ,
214- input : '@keyframes foo {}' ,
215- expected : '@keyframes :local(foo) {}'
214+ input : '@keyframes foo { from { color: red; } to { color: blue; } }' ,
215+ expected : '@keyframes :local(foo) { from { color: red; } to { color: blue; } }'
216216 } ,
217217 {
218218 should : 'localize keyframes in global default mode' ,
@@ -222,8 +222,8 @@ var tests = [
222222 } ,
223223 {
224224 should : 'localize explicit keyframes' ,
225- input : '@keyframes :local(foo) {} @-webkit-keyframes :global(bar) {}' ,
226- expected : '@keyframes :local(foo) {} @-webkit-keyframes bar {}'
225+ input : '@keyframes :local(foo) { 0% { color: red; } 33.3% { color: yellow; } 100% { color: blue; } } @-webkit-keyframes :global(bar) { from { color: red; } to { color: blue; } }' ,
226+ expected : '@keyframes :local(foo) { 0% { color: red; } 33.3% { color: yellow; } 100% { color: blue; } } @-webkit-keyframes bar { from { color: red; } to { color: blue; } }'
227227 } ,
228228 {
229229 should : 'ignore :export statements' ,
@@ -330,31 +330,20 @@ var tests = [
330330 error : / @ k e y f r a m e s : g l o b a l \( \. \. \. \) i s n o t a l l o w e d i n p u r e m o d e /
331331 } ,
332332 {
333- should : 'throw on implicit global element' ,
333+ should : 'pass through global element' ,
334334 input : 'input {}' ,
335- error : / ' i n p u t ' m u s t b e e x p l i c i t f l a g g e d : g l o b a l /
336- } ,
337- {
338- should : 'throw on implicit global element (with multiple 1)' ,
339- input : 'input, .foo {}' ,
340- error : / ' i n p u t , \. f o o ' m u s t b e e x p l i c i t f l a g g e d : g l o b a l /
335+ expected : 'input {}'
341336 } ,
342337 {
343- should : 'throw on implicit global element (with multiple 2) ' ,
344- input : '.foo, input {}' ,
345- error : / ' \ .f o o , i n p u t ' m u s t b e e x p l i c i t f l a g g e d : g l o b a l /
338+ should : 'localise class and pass through element ' ,
339+ input : '.foo input {}' ,
340+ expected : ':local( .foo) input {}'
346341 } ,
347342 {
348- should : 'throw on implicit global attribute' ,
343+ should : 'pass through attribute selector ' ,
349344 input : '[type="radio"] {}' ,
350- error : / ' \ [t y p e = " r a d i o " \] ' m u s t b e e x p l i c i t f l a g g e d : g l o b a l /
345+ expected : ' [type="radio"] {}'
351346 } ,
352- {
353- should : 'throw on implicit global attribute in nested' ,
354- input : ':not([type="radio"]) {}' ,
355- error : / ' : n o t \( \[ t y p e = " r a d i o " \] \) ' m u s t b e e x p l i c i t f l a g g e d : g l o b a l /
356- } ,
357-
358347 {
359348 should : 'not modify urls without option' ,
360349 input : '.a { background: url(./image.png); }\n' +
@@ -379,6 +368,7 @@ var tests = [
379368 '.b { background: url((global\\)image.png\\\"global\\\"); }\n' +
380369 ':local(.c) { background: url(\"(local)./image.png\\\"local\\\"\"); }'
381370 }
371+
382372] ;
383373
384374function process ( css , options ) {
0 commit comments