@@ -211,8 +211,8 @@ var tests = [
211
211
} ,
212
212
{
213
213
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; } }'
216
216
} ,
217
217
{
218
218
should : 'localize keyframes in global default mode' ,
@@ -222,8 +222,8 @@ var tests = [
222
222
} ,
223
223
{
224
224
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; } }'
227
227
} ,
228
228
{
229
229
should : 'ignore :export statements' ,
@@ -330,31 +330,20 @@ var tests = [
330
330
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 /
331
331
} ,
332
332
{
333
- should : 'throw on implicit global element' ,
333
+ should : 'pass through global element' ,
334
334
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 {}'
341
336
} ,
342
337
{
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 {}'
346
341
} ,
347
342
{
348
- should : 'throw on implicit global attribute' ,
343
+ should : 'pass through attribute selector ' ,
349
344
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"] {}'
351
346
} ,
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
-
358
347
{
359
348
should : 'not modify urls without option' ,
360
349
input : '.a { background: url(./image.png); }\n' +
@@ -379,6 +368,7 @@ var tests = [
379
368
'.b { background: url((global\\)image.png\\\"global\\\"); }\n' +
380
369
':local(.c) { background: url(\"(local)./image.png\\\"local\\\"\"); }'
381
370
}
371
+
382
372
] ;
383
373
384
374
function process ( css , options ) {
0 commit comments