@@ -475,11 +475,11 @@ it('transforms box-shadow without blur-radius', () => runTest([
475
475
} ) ) ;
476
476
477
477
it ( 'transforms box-shadow without color' , ( ) => runTest ( [
478
- [ 'box-shadow' , '10px 20px red ' ] ,
478
+ [ 'box-shadow' , '10px 20px 30px ' ] ,
479
479
] , {
480
480
shadowOffset : { width : 10 , height : 20 } ,
481
- shadowRadius : 0 ,
482
- shadowColor : 'red ' ,
481
+ shadowRadius : 30 ,
482
+ shadowColor : 'black ' ,
483
483
} ) ) ;
484
484
485
485
it ( 'transforms box-shadow without blur-radius, color' , ( ) => runTest ( [
@@ -490,6 +490,38 @@ it('transforms box-shadow without blur-radius, color', () => runTest([
490
490
shadowColor : 'black' ,
491
491
} ) ) ;
492
492
493
+ it ( 'transforms box-shadow with rgb color' , ( ) => runTest ( [
494
+ [ 'box-shadow' , '10px 20px rgb(100, 100, 100)' ] ,
495
+ ] , {
496
+ shadowOffset : { width : 10 , height : 20 } ,
497
+ shadowRadius : 0 ,
498
+ shadowColor : 'rgb(100, 100, 100)' ,
499
+ } ) ) ;
500
+
501
+ it ( 'transforms box-shadow with rgba color' , ( ) => runTest ( [
502
+ [ 'box-shadow' , '10px 20px rgba(100, 100, 100, 0.5)' ] ,
503
+ ] , {
504
+ shadowOffset : { width : 10 , height : 20 } ,
505
+ shadowRadius : 0 ,
506
+ shadowColor : 'rgba(100, 100, 100, 0.5)' ,
507
+ } ) ) ;
508
+
509
+ it ( 'transforms box-shadow with hsl color' , ( ) => runTest ( [
510
+ [ 'box-shadow' , '10px 20px hsl(120, 100%, 50%)' ] ,
511
+ ] , {
512
+ shadowOffset : { width : 10 , height : 20 } ,
513
+ shadowRadius : 0 ,
514
+ shadowColor : 'hsl(120, 100%, 50%)' ,
515
+ } ) ) ;
516
+
517
+ it ( 'transforms box-shadow with hsla color' , ( ) => runTest ( [
518
+ [ 'box-shadow' , '10px 20px hsla(120, 100%, 50%, 0.7)' ] ,
519
+ ] , {
520
+ shadowOffset : { width : 10 , height : 20 } ,
521
+ shadowRadius : 0 ,
522
+ shadowColor : 'hsla(120, 100%, 50%, 0.7)' ,
523
+ } ) ) ;
524
+
493
525
it ( 'transforms box-shadow enforces offset to be present' , ( ) => {
494
526
expect ( ( ) => transformCss ( [ [ 'box-shadow' , 'red' ] ] ) )
495
527
. toThrow ( 'Failed to parse declaration "boxShadow: red"' ) ;
0 commit comments