forked from bigcommerce/cornerstone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_modal.scss
120 lines (100 loc) · 2.64 KB
/
_modal.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
// =============================================================================
// MODAL (CSS)
//
// // 1. Fix for content shifted to top in modal window when bottom variant option selected
// =============================================================================
.modal {
left: 50%;
margin: 0;
max-height: 90%;
max-width: 95%;
min-height: 240px;
outline: none;
overflow: hidden;
padding: 0;
top: 50% !important;
transform: translate(-50%, -50%);
.form-field {
position: relative; // 1
}
}
.modal--large {
@include breakpoint("large") {
width: $modal-width--large;
}
}
.modal-header {
padding-left: $reveal-modal-paddingHorizontal;
padding-right: remCalc($reveal-close-height) + $reveal-close-side;
}
.modal-header-title {
font-size: fontSize("large");
text-align: center;
@include breakpoint("medium") {
font-size: fontSize("larger");
}
}
.modal-close {
@include square($reveal-close-height);
@include addFocusTooltip;
color: stencilColor("icon-color");
font-size: 26px;
line-height: remCalc($reveal-close-height);
padding: 0;
position: absolute;
text-align: center;
text-decoration: none;
z-index: zIndex("high");
@include breakpoint("medium") {
font-size: 32px;
}
&:hover {
color: stencilColor("icon-color-hover");
}
&::before {
right: 50%;
transform: translateX(50%);
}
&::after {
right: 50%;
transform: translateX(remCalc(10px));
}
}
.modal-body {
overflow: auto;
-webkit-overflow-scrolling: touch;
padding: $reveal-modal-padding;
}
.modal--alert {
background-color: $alert-modal-bgColor;
border-radius: $alert-modal-borderRadius;
font-family: $alert-font-body;
padding: 40px 20px 20px;
text-align: center;
.modal-content {
color: $alert-font-bodyColor;
font-size: $alert-font-bodySize;
}
.button-container {
margin: $alert-button-wrapperMargin;
.confirm {
background-color: $alert-button-bgColor;
border-color: $alert-button-borderColor;
color: $alert-button-color;
}
.confirm:focus,
.confirm:hover {
background-color: $alert-button-bgColorHover;
border-color: $alert-button-borderColorHover;
color: $alert-button-colorHover;
}
.confirm:active {
background-color: $alert-button-bgColorActive;
border-color: $alert-button-borderColorActive;
color: $alert-button-colorActive;
}
}
}
.hide-content {
opacity: 0;
}