@@ -190,15 +190,15 @@ describe('flex directive', () => {
190
190
fixture . detectChanges ( ) ;
191
191
expectNativeEl ( fixture ) . toHaveStyle ( {
192
192
'max-width' : '2%' ,
193
- 'flex' : '1 1 100 %' ,
193
+ 'flex' : '1 1 2 %' ,
194
194
'box-sizing' : 'border-box' ,
195
195
} , styler ) ;
196
196
} ) ;
197
197
198
198
it ( 'should work with percentage values' , ( ) => {
199
199
componentWithTemplate ( `<div fxFlex='37%'></div>` ) ;
200
200
expectNativeEl ( fixture ) . toHaveStyle ( {
201
- 'flex' : '1 1 100 %' ,
201
+ 'flex' : '1 1 37 %' ,
202
202
'max-width' : '37%' ,
203
203
'box-sizing' : 'border-box' ,
204
204
} , styler ) ;
@@ -456,7 +456,7 @@ describe('flex directive', () => {
456
456
expectNativeEl ( fixture )
457
457
. not . toHaveStyle ( {
458
458
'flex-direction' : 'row' ,
459
- 'flex' : '1 1 100 %' ,
459
+ 'flex' : '1 1 37 %' ,
460
460
'max-height' : '37%' ,
461
461
} , styler ) ;
462
462
} ) ;
@@ -472,23 +472,23 @@ describe('flex directive', () => {
472
472
fixture . detectChanges ( ) ;
473
473
expectEl ( queryFor ( fixture , '[fxFlex]' ) [ 0 ] )
474
474
. toHaveStyle ( {
475
- 'flex' : '1 1 100 %' ,
475
+ 'flex' : '1 1 37 %' ,
476
476
'max-height' : '37%' ,
477
477
} , styler ) ;
478
478
} ) ;
479
479
480
480
it ( 'should set max-width for `fxFlex="<%val>"`' , ( ) => {
481
481
componentWithTemplate ( `<div fxFlex='37%'></div>` ) ;
482
482
expectNativeEl ( fixture ) . toHaveStyle ( {
483
- 'flex' : '1 1 100 %' ,
483
+ 'flex' : '1 1 37 %' ,
484
484
'max-width' : '37%' ,
485
485
} , styler ) ;
486
486
} ) ;
487
487
488
488
it ( 'should set max-width for `fxFlex="2%"` usage' , ( ) => {
489
489
componentWithTemplate ( `<div fxFlex='2%'></div>` ) ;
490
490
expectNativeEl ( fixture ) . toHaveStyle ( {
491
- 'flex' : '1 1 100 %' ,
491
+ 'flex' : '1 1 2 %' ,
492
492
'max-width' : '2%' ,
493
493
} , styler ) ;
494
494
} ) ;
@@ -510,15 +510,15 @@ describe('flex directive', () => {
510
510
fixture . detectChanges ( ) ;
511
511
512
512
expectNativeEl ( fixture ) . toHaveStyle ( {
513
- 'flex' : '1 1 100 %' ,
513
+ 'flex' : '1 1 50 %' ,
514
514
'max-width' : '50%'
515
515
} , styler ) ;
516
516
517
517
matchMedia . activate ( 'sm' , true ) ;
518
518
fixture . detectChanges ( ) ;
519
519
520
520
expectNativeEl ( fixture ) . toHaveStyle ( {
521
- 'flex' : '1 1 100 %' ,
521
+ 'flex' : '1 1 33 %' ,
522
522
'max-width' : '33%'
523
523
} , styler ) ;
524
524
} ) ;
@@ -546,9 +546,9 @@ describe('flex directive', () => {
546
546
fixture . detectChanges ( ) ;
547
547
548
548
nodes = queryFor ( fixture , '[fxFlex]' ) ;
549
- expectEl ( nodes [ 0 ] ) . toHaveStyle ( { 'flex' : '1 1 100 %' , 'max-height' : '50%' } , styler ) ;
550
- expectEl ( nodes [ 1 ] ) . toHaveStyle ( { 'flex' : '1 1 100 %' , 'max-height' : '24.4%' } , styler ) ;
551
- expectEl ( nodes [ 2 ] ) . toHaveStyle ( { 'flex' : '1 1 100 %' , 'max-height' : '25.6%' } , styler ) ;
549
+ expectEl ( nodes [ 0 ] ) . toHaveStyle ( { 'flex' : '1 1 50 %' , 'max-height' : '50%' } , styler ) ;
550
+ expectEl ( nodes [ 1 ] ) . toHaveStyle ( { 'flex' : '1 1 24.4 %' , 'max-height' : '24.4%' } , styler ) ;
551
+ expectEl ( nodes [ 2 ] ) . toHaveStyle ( { 'flex' : '1 1 25.6 %' , 'max-height' : '25.6%' } , styler ) ;
552
552
553
553
matchMedia . activate ( 'sm' ) ;
554
554
fixture . detectChanges ( ) ;
@@ -597,9 +597,9 @@ describe('flex directive', () => {
597
597
fixture . detectChanges ( ) ;
598
598
nodes = queryFor ( fixture , '[fxFlex]' ) ;
599
599
600
- expectEl ( nodes [ 0 ] ) . toHaveStyle ( { 'flex' : '1 1 100 %' , 'max-height' : '50%' } , styler ) ;
601
- expectEl ( nodes [ 1 ] ) . toHaveStyle ( { 'flex' : '1 1 100 %' , 'max-height' : '24.4%' } , styler ) ;
602
- expectEl ( nodes [ 2 ] ) . toHaveStyle ( { 'flex' : '1 1 100 %' , 'max-height' : '25.6%' } , styler ) ;
600
+ expectEl ( nodes [ 0 ] ) . toHaveStyle ( { 'flex' : '1 1 50 %' , 'max-height' : '50%' } , styler ) ;
601
+ expectEl ( nodes [ 1 ] ) . toHaveStyle ( { 'flex' : '1 1 24.4 %' , 'max-height' : '24.4%' } , styler ) ;
602
+ expectEl ( nodes [ 2 ] ) . toHaveStyle ( { 'flex' : '1 1 25.6 %' , 'max-height' : '25.6%' } , styler ) ;
603
603
} ) ;
604
604
605
605
it ( 'should fallback to the default layout from lt-md selectors' , ( ) => {
@@ -621,7 +621,7 @@ describe('flex directive', () => {
621
621
nodes = queryFor ( fixture , '[fxFlex]' ) ;
622
622
623
623
expectEl ( nodes [ 0 ] ) . toHaveStyle ( {
624
- 'flex' : '1 1 100 %' ,
624
+ 'flex' : '1 1 50 %' ,
625
625
'max-height' : '50%'
626
626
} , styler ) ;
627
627
0 commit comments