diff --git a/src/components/gridList/grid-list.js b/src/components/gridList/grid-list.js index 7f4fe334113..5e701cd7f0a 100644 --- a/src/components/gridList/grid-list.js +++ b/src/components/gridList/grid-list.js @@ -319,14 +319,12 @@ function GridListDirective($interpolate, $mdConstant, $mdGridLayout, $mdMedia) { } function getGridStyle(colCount, rowCount, gutter, rowMode, rowHeight) { - var style = { - height: '', - paddingBottom: '' - }; + var style = {}; switch(rowMode) { case 'fixed': style.height = DIMENSION({ unit: rowHeight, span: rowCount, gutter: gutter }); + style.paddingBottom = ''; break; case 'ratio': @@ -336,6 +334,7 @@ function GridListDirective($interpolate, $mdConstant, $mdGridLayout, $mdMedia) { vShare = hShare * (1 / rowHeight), vUnit = UNIT({ share: vShare, gutterShare: hGutterShare, gutter: gutter }); + style.height = ''; style.paddingBottom = DIMENSION({ unit: vUnit, span: rowCount, gutter: gutter}); break;