]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/bootstrap.scss
Refactor modal buttons style
[github/Chocobozzz/PeerTube.git] / client / src / sass / bootstrap.scss
CommitLineData
2f4c784a
C
1$icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
2@import '_bootstrap';
3
4@import '_variables';
5@import '_mixins';
6
7// Thanks https://gist.github.com/alexandrevicenzi/680147013e902a4eaa5d
8.glyphicon-refresh-animate {
9 animation: spin .7s infinite linear;
10}
11
6b1ef956 12.glyphicon-duplicate {
13 font-size: 70%;
14}
15
f409f0c3
RK
16.flex-auto {
17 flex: auto;
18}
19
d3217560
RK
20.c-hand {
21 cursor: pointer;
22}
23
2f4c784a 24@keyframes spin {
a3705089
C
25 from {
26 transform: scale(1) rotate(0deg);
27 }
28 to {
29 transform: scale(1) rotate(360deg);
30 }
2f4c784a
C
31}
32
757ffdfe 33/* rules for dropdowns excepts when in button group, to avoid impacting the dropdown-toggle */
2856af48 34.dropdown {
f8cce49c 35 z-index: z(dropdown) !important;
2856af48 36}
26ede95e 37
2856af48
C
38.list-overflow-menu,
39.parent-entry {
40 z-index: z(header) - 1 !important;
eb7c7a51
RK
41}
42
2856af48
C
43.btn-group,
44.dropdown-root,
45.action-dropdown,
46.input-group-prepend,
47.column-toggle {
48 z-index: inherit !important;
49}
50
d4132d3f
RK
51.btn-group > .btn:not(:first-child) {
52 border-top-left-radius: 0 !important;
53 border-bottom-left-radius: 0 !important;
54}
55
2f4c784a 56.dropdown-menu {
e0433a5f
C
57 z-index: z(dropdown) + 1 !important;
58
2f4c784a 59 border-radius: 3px;
6f6e89db 60 box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
2f4c784a
C
61 font-size: 15px;
62
0d3a2982
RK
63 .dropdown-header {
64 padding-left: 1rem;
65 }
66
2f4c784a
C
67 .dropdown-item {
68 padding: 3px 15px;
69
24e7916c 70 &.active {
e66883b3
RK
71 color: pvar(--mainBackgroundColor) !important;
72 background-color: pvar(--mainHoverColor);
24e7916c 73 opacity: .9;
2f4c784a 74 }
45c6bcf3 75
0aa52e17
C
76 &:active {
77 color: pvar(--mainForegroundColor) !important;
78 }
79
d3217560
RK
80 &::after {
81 display: none;
82 }
2f4c784a
C
83 }
84
85 button {
86 @include disable-default-a-behaviour;
87 }
88
89 a {
90 @include disable-default-a-behaviour;
91 color: #000 !important;
92 }
93}
94
26171379
C
95.badge {
96 line-height: 1.1;
97}
3921166d 98
165ee292 99@media screen and (min-width: #{breakpoint(md)}) {
3921166d 100 .modal:before {
3921166d
RK
101 vertical-align: middle;
102 content: " ";
103 height: 100%;
104 }
105
106 .modal-dialog {
3921166d 107 text-align: left;
2bc9bd08
RK
108
109 &:not(.modal-lg):not(.modal-xl) {
110 min-width: 500px;
111 width: 40vw;
112 max-width: 900px;
113 }
3921166d
RK
114 }
115}
116
2f4c784a 117.modal {
3921166d
RK
118 text-align: center;
119
2f4c784a 120 .modal-content {
e66883b3 121 background-color: pvar(--mainBackgroundColor);
f8b255cd 122 word-break: break-all;
2f4c784a
C
123 }
124
125 .modal-header {
126 border-bottom: none;
127 margin-bottom: 5px;
128
129 .modal-title {
130 font-size: 20px;
131 font-weight: $font-semibold;
132 }
133
134 my-global-icon {
54e78847 135 @include icon(22px);
2f4c784a
C
136
137 position: relative;
54e78847 138 top: 5px;
2f4c784a
C
139 float: right;
140
141 margin: 0;
142 padding: 0;
54e78847 143 opacity: .5;
8319d6ae
RK
144
145 &[iconName="cross"] {
146 @include icon(16px);
147 top: -3px;
148 }
2f4c784a
C
149 }
150 }
151
152 .inputs {
153 margin-bottom: 0;
154 text-align: right;
155
266947e5
C
156 > .peertube-button:not(:first-child) {
157 margin-left: 10px
2f4c784a
C
158 }
159 }
160}
161
8110705d 162
163// On desktop browsers, make the content and header horizontally sticked to right not move when modal open and close
164.modal-open {
165 overflow-y: scroll !important; // Make sure vertical scroll bar is always visible on desktop browsers to get disabled scrollbar effect
17384fd8 166 width: 100vw; // Make sure the content fits all the available width
8110705d 167}
168
245b9d27
K
169// On touchscreen devices, simply overflow: hidden to avoid detached overlay on scroll
170@media (hover: none) and (pointer: coarse) {
171 .modal-open, .menu-open {
172 overflow: hidden !important;
173 }
174
175 // On touchscreen devices display content overlay when opened menu
176 .menu-open {
177 .main-col {
178 &::before {
179 background-color: black;
180 width: 100vw;
181 height: 100vh;
182 opacity: 0.75;
183 content: '';
184 display: block;
185 position: fixed;
d6eace77 186 z-index: z('menu') - 1;
245b9d27
K
187 }
188 }
189 }
190}
191
2f4c784a
C
192// Nav customizations
193.nav .nav-link {
194 display: flex !important;
195 align-items: center;
196 height: 30px !important;
197 padding: 10px 15px !important;
198}
199
200.nav.nav-pills {
201 font-size: 16px !important;
ed5bb517 202 font-weight: $font-semibold !important;
2f4c784a 203
ed5bb517
K
204 .nav-link {
205 opacity: 0.6 !important;
206
207 &.active, &:hover, &:active, &:focus {
208 opacity: 1 !important;
209 }
2f4c784a
C
210 }
211
212 a {
213 @include disable-default-a-behaviour;
214
e66883b3 215 color: pvar(--mainForegroundColor);
2f4c784a
C
216 }
217}
218
ed5bb517
K
219.nav-tabs .nav-link {
220 @include disable-default-a-behaviour;
2f4c784a 221
ed5bb517
K
222 color: pvar(--mainForegroundColor);
223 font-weight: $font-semibold;
224 border: none;
225 border-bottom: 2px solid transparent;
226 opacity: 0.6;
2f4c784a 227
758f0d19 228 &.active {
ed5bb517 229 color: pvar(--mainForegroundColor);
e66883b3 230 background-color: pvar(--mainBackgroundColor) !important;
ed5bb517 231 border-bottom-color: pvar(--mainColor);
758f0d19 232 }
ed5bb517
K
233
234 &.active, &:hover, &:active, &:focus {
235 opacity: 1;
758f0d19 236 }
2f4c784a
C
237}
238
a4610bc6 239.card {
e66883b3 240 background-color: pvar(--mainBackgroundColor);
a4610bc6
JM
241 border-color: #dee2e6;
242}
243
2f4c784a
C
244.collapse-transition {
245 // Animation when we show/hide the filters
246 transition: max-height 0.3s;
247 display: block !important;
248 overflow: hidden !important;
249 max-height: 0;
250
251 &.show {
252 max-height: 1500px;
253 }
254}
bc584963
RK
255
256.dropdown-divider {
257 margin: 0.3rem 0;
000eb0e4
RK
258}
259
260ngb-modal-backdrop {
36f2981f
RK
261 z-index: z(modal) - 1 !important;
262}
263
264ngb-modal-window {
265 z-index: z(modal) !important;
000eb0e4 266}
aa0f1963 267
757ffdfe
RK
268ngb-popover-window {
269 z-index: z(popover) !important;
270}
271
272ngb-tooltip-window {
273 z-index: z(tooltip) !important;
274}
275
947d0102
RK
276.btn-outline-secondary {
277 border-color: $input-border-color;
278
279 &:focus-within,
280 &:focus,
281 &:hover {
282 color: #fff;
283 background-color: #6c757d;
284 }
285}
286
aa0f1963 287.btn-outline-tertiary {
e66883b3
RK
288 color: pvar(--secondaryColor);
289 border-color: pvar(--secondaryColor);
a3705089 290
947d0102
RK
291 &:focus-within,
292 &:focus,
aa0f1963 293 &:hover {
e66883b3
RK
294 color: pvar(--mainBackgroundColor);
295 background-color: pvar(--secondaryColor);
aa0f1963
RK
296 }
297}
a6d5ff76
RK
298
299// input box-shadow on focus
300.form-control {
301 font-size: 15px;
e66883b3
RK
302 color: pvar(--mainForegroundColor);
303 background-color: pvar(--inputBackgroundColor);
a6d5ff76
RK
304 outline: none;
305
306 &:focus-within,
307 &:focus {
e66883b3 308 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
a6d5ff76
RK
309
310 &.input-error {
6a4c30de 311 box-shadow: #{$focus-box-shadow-form} #{scale-color($red, $alpha: -75%)};
a6d5ff76
RK
312 }
313 }
314}
947d0102 315
0d3a2982
RK
316.input-group {
317 & > .form-control {
318 flex: initial;
319 }
25a42e29
RK
320 input.form-control {
321 width: unset !important;
322 flex-grow: 1;
0d3a2982
RK
323 }
324
325 .input-group-prepend + input {
326 border-top-left-radius: 0 !important;
327 border-bottom-left-radius: 0 !important;
328 }
947d0102 329}
25a42e29
RK
330
331.has-feedback.has-clear {
332 position: relative;
333
334 input {
335 padding-right: 1.5rem !important;
336 }
337
338 .form-control-clear {
339 color: rgba(0, 0, 0, 0.4);
340 /*
341 * Enable pointer events as they have been disabled since Bootstrap 3.3
342 * See https://github.com/twbs/bootstrap/pull/14104
343 */
344 pointer-events: all;
345 display: flex;
346 justify-content: center;
347 align-items: center;
348 position: absolute;
349 right: .5rem;
350 height: 95%;
4f5d0459 351 font-size: 14px;
25a42e29
RK
352
353 &:hover {
354 color: rgba(0, 0, 0, 0.7);
355 cursor: pointer;
356 }
357 }
358
359 input:placeholder-shown + .form-control-clear {
360 display: none;
361 }
362}
ea5cdc11
RK
363
364.callout {
728a1236
RK
365 padding: 1.25rem;
366 border: 1px solid #eee;
ea5cdc11
RK
367 border-radius: .25rem;
368
369 & > label {
370 position: relative;
371 top: -5px;
372 left: -10px;
373 color: #6c757d !important;
374 }
375
376 &:not(.callout-light) {
377 border-left-width: .25rem;
378 }
26171379 379
ea5cdc11
RK
380 &.callout-info {
381 border-color: pvar(--mainColorLightest);
382 border-left-color: pvar(--mainColor);
383 }
384}