Skip to content

Commit cbe2cc5

Browse files
committed
IMP: modal added-to style
1 parent b1d6f64 commit cbe2cc5

File tree

1 file changed

+39
-21
lines changed

1 file changed

+39
-21
lines changed
Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,50 @@
1+
@modal-added-to-cart-offset: 20px;
2+
@modal-added-to-cart-max-width: 480px;
3+
@modal-added-to-cart-padding: (@modal-popup__padding / 2);
4+
@modal-added-to-cart-bg: @modal__background-color;
5+
@modal-added-to-cart-color: inherit;
6+
@modal-added-to-cart-box-shadow: @modal__box-shadow;
7+
18
& when (@media-common = true) {
2-
.add-to-cart {
9+
.modal-added-to-cart {
310
z-index: 9;
411
position: fixed;
512
top: 0;
6-
left: 50%;
7-
transform: translateX(-50%);
8-
background-color: #fff;
13+
right: 0;
14+
bottom: auto;
15+
left: 0;
16+
max-width: @modal-added-to-cart-max-width;
17+
margin: 0 auto;
18+
padding: @modal-added-to-cart-padding;dding;
19+
background-color: @modal-added-to-cart-bg;
20+
color: @modal-added-to-cart-color;
21+
box-shadow: @modal-added-to-cart-box-shadow;
22+
23+
.modal-content {
24+
display: flex;
25+
align-items: flex-start;
26+
margin-right: @modal-action-close__font-size;
27+
}
928

10-
@media only screen and (min-width: 480px) {
11-
top: 20px;
29+
.product-image {
30+
flex: 0 0 auto;
31+
width: 50px;
32+
margin-right: 1em;
1233
}
34+
}
1335

14-
.btn-close {
15-
@size: 10px;
16-
position: absolute;
17-
top: 15px;
18-
right: 15px;
19-
padding: 15px;
20-
height: @size;
21-
width: @size;
22-
border-radius: 50%;
23-
background: url("../images/icons/close.svg") center/10px no-repeat;
24-
transition: background-color 0.2s;
25-
cursor: pointer;
36+
.message.message-add-to-cart {
37+
padding: @message__padding;
2638

27-
&:hover {
28-
background-color: #f2f2f2;
29-
}
39+
> :first-child::before {
40+
content: none;
3041
}
3142
}
3243
}
44+
45+
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
46+
.modal-added-to-cart {
47+
top: @modal-added-to-cart-offset;
48+
}
49+
}
50+

0 commit comments

Comments
 (0)