File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,10 @@ const responsive = styles => theme => {
166
166
}
167
167
for ( let i = 0 ; i < value . slice ( 0 , mediaQueries . length ) . length ; i ++ ) {
168
168
const media = mediaQueries [ i ]
169
- if ( value [ i ] == null ) continue
169
+ if ( value [ i ] == null ) {
170
+ next [ media ] = { }
171
+ continue
172
+ }
170
173
if ( ! media ) {
171
174
next [ key ] = value [ i ]
172
175
continue
Original file line number Diff line number Diff line change @@ -263,6 +263,7 @@ test('skip breakpoints', () => {
263
263
} ) ( theme )
264
264
expect ( result ) . toEqual ( {
265
265
width : '100%' ,
266
+ '@media screen and (min-width: 40em)' : { } ,
266
267
'@media screen and (min-width: 52em)' : {
267
268
width : '50%' ,
268
269
} ,
@@ -415,19 +416,19 @@ test('returns correct media query order', () => {
415
416
const keys = Object . keys ( result )
416
417
expect ( keys ) . toEqual ( [
417
418
'width' ,
418
- 'color' ,
419
419
'@media screen and (min-width: 40em)' ,
420
420
'@media screen and (min-width: 52em)' ,
421
+ 'color' ,
421
422
] )
422
423
expect ( result ) . toEqual ( {
423
424
width : '100%' ,
424
- color : 'red' ,
425
425
'@media screen and (min-width: 40em)' : {
426
426
color : 'green' ,
427
427
} ,
428
428
'@media screen and (min-width: 52em)' : {
429
429
width : '50%' ,
430
430
color : 'blue' ,
431
431
} ,
432
+ color : 'red' ,
432
433
} )
433
434
} )
You can’t perform that action at this time.
0 commit comments