Skip to content

Commit 88dc910

Browse files
ENGCOM-7264: Fix widget recent view product not fit in mobile view #27572
- Merge Pull Request #27572 from mrtuvn/magento2:27058-fix-recent-view-product-fit-mobile - Merged commits: 1. d7cf188 2. 9c81433 3. 4b64f33 4. 5f0c02b 5. 581ab1f 6. a4935e3 7. ce431d3
2 parents 3f1099e + ce431d3 commit 88dc910

File tree

1 file changed

+46
-20
lines changed
  • app/design/frontend/Magento/blank/Magento_Catalog/web/css/source

1 file changed

+46
-20
lines changed

app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/_widgets.less

Lines changed: 46 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
.block.widget {
2626
.products-grid .product-item {
2727
margin-left: 2%;
28-
width: calc(~'(100% - 2%)/2');
28+
width: calc(~'(100% - 2%) / 2');
2929

3030
&:nth-child(2n + 1) {
3131
margin-left: 0;
@@ -63,6 +63,34 @@
6363
// Mobile
6464
// _____________________________________________
6565

66+
.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
67+
.sidebar .block-viewed-products-grid {
68+
.products-grid {
69+
.product-item {
70+
margin-left: 2%;
71+
width: calc(~'(100% - 2%) / 2');
72+
73+
&:nth-child(2n + 1) {
74+
margin-left: 0;
75+
}
76+
}
77+
78+
.product-item-photo {
79+
display: block;
80+
position: relative;
81+
}
82+
83+
.product-item-details {
84+
margin: 0;
85+
}
86+
87+
.product-item-info {
88+
text-align: center;
89+
}
90+
}
91+
}
92+
}
93+
6694
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__s) {
6795
.block.widget .products-grid .product-item,
6896
.page-layout-1column .block.widget .products-grid .product-item,
@@ -72,7 +100,7 @@
72100

73101
.page-layout-1column .block.widget .products-grid .product-item {
74102
margin-left: 2%;
75-
width: calc(~'(100% - 4%)/3');
103+
width: calc(~'(100% - 4%) / 3');
76104

77105
&:nth-child(3n + 1) {
78106
margin-left: 0;
@@ -101,7 +129,7 @@
101129

102130
.page-layout-1column .block.widget .products-grid .product-item {
103131
margin-left: 2%;
104-
width: calc(~'(100% - 6%)/4');
132+
width: calc(~'(100% - 6%) / 4');
105133

106134
&:nth-child(3n + 1) {
107135
margin-left: 2%;
@@ -115,6 +143,20 @@
115143
.page-layout-3columns .block.widget .products-grid .product-item {
116144
width: 100%/2;
117145
}
146+
147+
.sidebar .block.widget .pager {
148+
.item:not(.pages-item-next):not(.pages-item-previous) {
149+
&:extend(.abs-no-display-desktop all);
150+
}
151+
152+
.pages-item-next {
153+
padding: 0;
154+
155+
.action {
156+
margin: 0;
157+
}
158+
}
159+
}
118160
}
119161

120162
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__l) {
@@ -124,7 +166,7 @@
124166

125167
.page-layout-1column .block.widget .products-grid .product-item {
126168
margin-left: 2%;
127-
width: calc(~'(100% - 8%)/5');
169+
width: calc(~'(100% - 8%) / 5');
128170

129171
&:nth-child(4n + 1) {
130172
margin-left: 2%;
@@ -153,19 +195,3 @@
153195
}
154196
}
155197
}
156-
157-
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
158-
.sidebar .block.widget .pager {
159-
.item:not(.pages-item-next):not(.pages-item-previous) {
160-
&:extend(.abs-no-display-desktop all);
161-
}
162-
163-
.pages-item-next {
164-
padding: 0;
165-
166-
.action {
167-
margin: 0;
168-
}
169-
}
170-
}
171-
}

0 commit comments

Comments
 (0)