blob: 1beec7655952ef6c96cd708e616f9097a69cc539 (
plain) (
blame)
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
|
@use '../base' as *;
/* --------------------------------
File#: _1_modal-window
Title: Modal Window
Descr: A modal dialog used to display critical information
Usage: codyhouse.co/license
-------------------------------- */
.modal {
position: fixed;
z-index: var(--z-index-overlay, 15);
width: 100%;
height: 100%;
left: 0;
top: 0;
opacity: 0;
visibility: hidden;
&:not(.modal--is-visible) {
pointer-events: none;
background-color: transparent;
}
}
.modal--is-visible {
opacity: 1;
visibility: visible;
}
// close button
.modal__close-btn {
display: flex;
flex-shrink: 0;
border-radius: 50%;
cursor: pointer;
.icon {
display: block;
margin: auto;
}
}
.modal__close-btn--outer { // close button - outside the modal__content
width: 48px;
height: 48px;
position: fixed;
top: var(--space-sm);
right: var(--space-sm);
z-index: var(--z-index-fixed-element, 10);
background-color: alpha(var(--color-black), 0.9);
.icon {
color: var(--color-white); // icon color
}
&:hover {
background-color: alpha(var(--color-black), 1);
.icon {
transform: scale(1.1);
}
}
}
.modal__close-btn--inner { // close button - inside the modal__content
width: 2em;
height: 2em;
background-color: var(--color-bg-light);
box-shadow: var(--inner-glow), var(--shadow-sm);
.icon {
color: inherit; // icon color
}
&:hover {
background-color: var(--color-bg-lighter);
box-shadow: var(--inner-glow), var(--shadow-md);
}
}
// load content - optional
.modal--is-loading {
.modal__content {
visibility: hidden;
}
.modal__loader {
display: flex;
}
}
.modal__loader { // loader icon
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
display: none;
pointer-events: none;
}
|