/
modal.scss
136 lines (112 loc) · 2.22 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
// base styles for every modal popup used in Discourse
.modal-open #main {
overflow: hidden;
}
.modal-middle-container {
max-width: 100%;
margin-bottom: 30px; // For iOS Safari issues
}
// Hardcode to be the same as before for now. I would recommend not using bootbox, or finding a way so the html structure can be the same
.bootbox.modal {
top: 10%;
width: 100%;
}
.modal {
&.fade {
transition: opacity 0.3s linear, top 0.3s ease-out;
top: -25%;
}
&.fade.in {
top: 50%;
}
.modal-body {
padding: 0.667em;
overflow-y: scroll;
> * {
// adding box-sizing: border-box; to .modal-body causes iOS dropdown issues
box-sizing: border-box;
}
}
}
// we need a little extra room on mobile for the
// stuff inside the footer to fit
.modal-footer {
padding: 10px;
}
.modal-header {
padding: 10px;
h3 {
font-size: var(--font-up-2);
}
}
.close {
font-size: var(--font-up-4);
}
#choosing-topic {
p {
margin-top: 0;
padding-bottom: 0;
}
input[type="radio"] {
margin-right: 10px;
}
.category-chooser {
margin-bottom: 9px;
}
button {
margin-top: 10px;
display: block;
width: 300px;
}
form {
margin-top: 20px;
input:not(.filter-input)[type="text"] {
box-sizing: border-box;
width: 100%;
}
}
}
@media only screen and (max-device-width: 568px) {
.modal .flag-modal-body .flag-message {
height: 3em;
}
}
/* fixes for the new account confirm dialog on mobile */
.modal-inner-container {
margin-bottom: 20px;
}
/* fix for tall modals */
.fixed-modal {
.modal-middle-container {
margin-bottom: 0;
}
.modal-inner-container {
max-height: 90vh;
overflow: auto;
}
&.insert-hyperlink-modal .modal-inner-container {
overflow: visible;
}
html.keyboard-visible:not(.ios-device) & {
height: calc(100% - env(keyboard-inset-height));
.modal-inner-container {
margin: auto;
}
}
}
.modal .modal-body.reorder-categories {
max-height: calc(100vh - 220px);
}
.discard-draft-modal {
.modal-inner-container {
width: 250px;
}
.modal-footer {
justify-content: center;
flex-flow: column nowrap;
align-items: stretch;
.btn {
margin-right: 0;
}
}
}