Skip to content

Commit 21fc322

Browse files
author
Natalia Momotenko
committed
MAGETWO-36333: Mini Shopping Cart contains lots of empty space
1 parent 7810d0b commit 21fc322

File tree

3 files changed

+13
-11
lines changed
  • app
    • code/Magento/Checkout/view/frontend/web/js
    • design/frontend/Magento

3 files changed

+13
-11
lines changed

app/code/Magento/Checkout/view/frontend/web/js/sidebar.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,13 @@ define([
6060
* @private
6161
*/
6262
_isOverflowed: function() {
63-
var list = $(this.options.minicart.list);
63+
var list = $(this.options.minicart.list),
64+
cssOverflowClass = 'overflowed';
65+
6466
if (this.scrollHeight > list.innerHeight()) {
65-
list.parent().addClass('overflowed');
67+
list.parent().addClass(cssOverflowClass);
6668
} else {
67-
list.parent().removeClass('overflowed');
69+
list.parent().removeClass(cssOverflowClass);
6870
}
6971
},
7072

@@ -238,9 +240,9 @@ define([
238240
this.scrollHeight = 0;
239241
target.children().each(function() {
240242
if (counter-- > 0) {
241-
height += $(this).height() - 15;
243+
height += $(this).height();
242244
}
243-
self.scrollHeight += $(this).height() - 15;
245+
self.scrollHeight += $(this).height();
244246
});
245247

246248
target.remove();

app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/_minicart.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,6 @@
197197
&:first-child {
198198
padding-top: 0;
199199
}
200-
&:last-child {
201-
padding-bottom: 0;
202-
}
203200
> .product {
204201
&:extend(.abs-add-clearfix all);
205202
}
@@ -242,6 +239,9 @@
242239
@_icon-font-margin: -3px 0 0 7px,
243240
@_icon-font-position: after
244241
);
242+
.details {
243+
display: none;
244+
}
245245
}
246246
}
247247
.details-qty,

app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/_minicart.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,6 @@
205205
&:first-child {
206206
padding-top: 0;
207207
}
208-
&:last-child {
209-
padding-bottom: 0;
210-
}
211208
> .product {
212209
&:extend(.abs-add-clearfix all);
213210
}
@@ -273,6 +270,9 @@
273270
@_icon-font-position: after
274271
);
275272
}
273+
.details {
274+
display: none;
275+
}
276276
}
277277
}
278278
.details-qty,

0 commit comments

Comments
 (0)