@@ -37,6 +37,20 @@ $list-item-dense-header-font-size: 1.3rem !default;
37
37
$list-item-dense-font-size : 1.2rem !default ;
38
38
$list-item-dense-line-height : 1.25rem !default ;
39
39
40
+ // This is a mixin, which fixes IE11's vertical alignment issue, when using `min-height`.
41
+ // This mixin isn't that much generic to be used in other cases.
42
+ // It can be only used for the list-item's button container.
43
+ // See https://connect.microsoft.com/IE/feedback/details/816293/
44
+ @mixin ie11-min-height-flexbug ($min-height ) {
45
+ div .md-button :first-child {
46
+ & ::before {
47
+ content : ' ' ;
48
+ min-height : $min-height ;
49
+ visibility : hidden ;
50
+ }
51
+ }
52
+ }
53
+
40
54
md-list {
41
55
display : block ;
42
56
padding : $list-padding-top $list-padding-right $list-padding-bottom $list-padding-left ;
@@ -101,6 +115,8 @@ md-list {
101
115
& , & > ._md-no-style {
102
116
min-height : $list-item-dense-two-line-height ;
103
117
118
+ @include ie11-min-height-flexbug ($list-item-dense-two-line-height );
119
+
104
120
> .md-avatar , .md-avatar-icon {
105
121
margin-top : $baseline-grid * 1.5 ;
106
122
}
@@ -111,6 +127,8 @@ md-list {
111
127
& , & > ._md-no-style {
112
128
min-height : $list-item-dense-three-line-height ;
113
129
130
+ @include ie11-min-height-flexbug ($list-item-dense-three-line-height );
131
+
114
132
> md-icon :first-child ,
115
133
> .md-avatar {
116
134
margin-top : $baseline-grid * 2 ;
@@ -378,6 +396,8 @@ md-list-item {
378
396
height : auto ;
379
397
min-height : $list-item-two-line-height ;
380
398
399
+ @include ie11-min-height-flexbug ($list-item-two-line-height );
400
+
381
401
> .md-avatar , .md-avatar-icon {
382
402
margin-top : $baseline-grid * 1.5 ;
383
403
}
@@ -395,6 +415,8 @@ md-list-item {
395
415
height : auto ;
396
416
min-height : $list-item-three-line-height ;
397
417
418
+ @include ie11-min-height-flexbug ($list-item-three-line-height );
419
+
398
420
> md-icon :first-child ,
399
421
> .md-avatar {
400
422
margin-top : $baseline-grid * 2 ;
0 commit comments