]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/bootstrap.scss
Use bootstrap loader
[github/Chocobozzz/PeerTube.git] / client / src / sass / bootstrap.scss
CommitLineData
2f4c784a 1$icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
2f4c784a 2
8cbc40b2
C
3@use '_variables' as *;
4@use '_mixins' as *;
5
6@import './_bootstrap-variables';
7
8@import '~bootstrap/scss/functions';
9@import '~bootstrap/scss/variables';
8cbc40b2 10@import '~bootstrap/scss/mixins';
4c8749cb
C
11@import '~bootstrap/scss/utilities';
12
8cbc40b2
C
13@import '~bootstrap/scss/root';
14@import '~bootstrap/scss/reboot';
15@import '~bootstrap/scss/type';
16@import '~bootstrap/scss/grid';
8cbc40b2
C
17@import '~bootstrap/scss/forms';
18@import '~bootstrap/scss/buttons';
19@import '~bootstrap/scss/dropdown';
20@import '~bootstrap/scss/button-group';
8cbc40b2
C
21@import '~bootstrap/scss/nav';
22@import '~bootstrap/scss/card';
4c8749cb 23@import '~bootstrap/scss/accordion';
8cbc40b2
C
24@import '~bootstrap/scss/alert';
25@import '~bootstrap/scss/close';
26@import '~bootstrap/scss/modal';
27@import '~bootstrap/scss/tooltip';
28@import '~bootstrap/scss/popover';
a14c1764 29@import '~bootstrap/scss/spinners';
4c8749cb
C
30
31@import '~bootstrap/scss/helpers';
32@import '~bootstrap/scss/utilities/api';
8cbc40b2
C
33
34@import '~@neos21/bootstrap3-glyphicons/assets/stylesheets/bootstrap3-glyphicons';
2f4c784a 35
f409f0c3
RK
36.flex-auto {
37 flex: auto;
38}
39
d3217560 40.c-hand {
4c8749cb 41 cursor: pointer !important;
d3217560
RK
42}
43
5efa5df2
C
44// ---------------------------------------------------------------------------
45// Dropdown
46// ---------------------------------------------------------------------------
47
2f4c784a 48.dropdown-menu {
2f4c784a 49 font-size: 15px;
b788e691
C
50 color: pvar(--mainForegroundColor);
51 background-color: pvar(--mainBackgroundColor);
52
0d3a2982 53 .dropdown-header {
27bc9586 54 @include padding-left(1rem);
0d3a2982
RK
55 }
56
2f4c784a
C
57 .dropdown-item {
58 padding: 3px 15px;
59
24e7916c 60 &.active {
e66883b3
RK
61 color: pvar(--mainBackgroundColor) !important;
62 background-color: pvar(--mainHoverColor);
931d3430 63 opacity: 0.9;
2f4c784a 64 }
45c6bcf3 65
d3217560
RK
66 &::after {
67 display: none;
68 }
2f4c784a
C
69 }
70
2f4c784a
C
71 a {
72 @include disable-default-a-behaviour;
2f4c784a
C
73 }
74}
75
5efa5df2
C
76.dropdown-divider {
77 margin: 0.3rem 0;
78}
79
80// ---------------------------------------------------------------------------
81// Modal
82// ---------------------------------------------------------------------------
83
165ee292 84@media screen and (min-width: #{breakpoint(md)}) {
931d3430 85 .modal::before {
3921166d 86 vertical-align: middle;
931d3430 87 content: ' ';
3921166d
RK
88 height: 100%;
89 }
90
91 .modal-dialog {
27bc9586 92 text-align: start;
2bc9bd08
RK
93
94 &:not(.modal-lg):not(.modal-xl) {
95 min-width: 500px;
96 width: 40vw;
97 max-width: 900px;
98 }
3921166d
RK
99 }
100}
101
2f4c784a 102.modal {
3921166d
RK
103 text-align: center;
104
2f4c784a 105 .modal-content {
e66883b3 106 background-color: pvar(--mainBackgroundColor);
681276a6 107 word-break: break-word;
2f4c784a
C
108 }
109
110 .modal-header {
931d3430 111 border-bottom: 0;
2f4c784a
C
112 margin-bottom: 5px;
113
114 .modal-title {
115 font-size: 20px;
116 font-weight: $font-semibold;
117 }
118
119 my-global-icon {
54e78847 120 @include icon(22px);
2f4c784a
C
121
122 position: relative;
54e78847 123 top: 5px;
2f4c784a
C
124 float: right;
125
126 margin: 0;
127 padding: 0;
931d3430 128 opacity: 0.5;
8319d6ae 129
931d3430 130 &[iconName=cross] { /* stylelint-disable-line selector-max-compound-selectors */
8319d6ae 131 @include icon(16px);
931d3430 132
8319d6ae
RK
133 top: -3px;
134 }
2f4c784a
C
135 }
136 }
137
138 .inputs {
139 margin-bottom: 0;
27bc9586 140 text-align: end;
2f4c784a 141
26490335 142 > *:not(:first-child) {
27bc9586 143 @include margin-left(10px);
2f4c784a
C
144 }
145 }
146}
147
8110705d 148
149// On desktop browsers, make the content and header horizontally sticked to right not move when modal open and close
150.modal-open {
151 overflow-y: scroll !important; // Make sure vertical scroll bar is always visible on desktop browsers to get disabled scrollbar effect
17384fd8 152 width: 100vw; // Make sure the content fits all the available width
8110705d 153}
154
245b9d27
K
155// On touchscreen devices, simply overflow: hidden to avoid detached overlay on scroll
156@media (hover: none) and (pointer: coarse) {
931d3430
C
157 .modal-open,
158 .menu-open {
245b9d27
K
159 overflow: hidden !important;
160 }
161
162 // On touchscreen devices display content overlay when opened menu
163 .menu-open {
164 .main-col {
165 &::before {
931d3430 166 background-color: #000;
245b9d27
K
167 width: 100vw;
168 height: 100vh;
169 opacity: 0.75;
170 content: '';
171 display: block;
172 position: fixed;
43599029 173 z-index: z(overlay);
245b9d27
K
174 }
175 }
176 }
177}
178
5efa5df2
C
179// ---------------------------------------------------------------------------
180// Nav
181// ---------------------------------------------------------------------------
182
2f4c784a
C
183.nav .nav-link {
184 display: flex !important;
185 align-items: center;
186 height: 30px !important;
187 padding: 10px 15px !important;
188}
189
190.nav.nav-pills {
191 font-size: 16px !important;
ed5bb517 192 font-weight: $font-semibold !important;
2f4c784a 193
ed5bb517
K
194 .nav-link {
195 opacity: 0.6 !important;
196
931d3430
C
197 &.active,
198 &:hover,
199 &:active,
200 &:focus {
ed5bb517
K
201 opacity: 1 !important;
202 }
2f4c784a
C
203 }
204
205 a {
206 @include disable-default-a-behaviour;
207
e66883b3 208 color: pvar(--mainForegroundColor);
2f4c784a
C
209 }
210}
211
ed5bb517
K
212.nav-tabs .nav-link {
213 @include disable-default-a-behaviour;
2f4c784a 214
ed5bb517
K
215 color: pvar(--mainForegroundColor);
216 font-weight: $font-semibold;
931d3430 217 border: 0;
ed5bb517
K
218 border-bottom: 2px solid transparent;
219 opacity: 0.6;
2f4c784a 220
758f0d19 221 &.active {
ed5bb517 222 color: pvar(--mainForegroundColor);
e66883b3 223 background-color: pvar(--mainBackgroundColor) !important;
ed5bb517 224 border-bottom-color: pvar(--mainColor);
758f0d19 225 }
ed5bb517 226
931d3430
C
227 &.active,
228 &:hover,
229 &:active,
230 &:focus {
ed5bb517 231 opacity: 1;
758f0d19 232 }
2f4c784a
C
233}
234
5efa5df2
C
235// ---------------------------------------------------------------------------
236// Card, collapse and accordion
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;
dd24f1bb 253 overflow: inherit !important;
2f4c784a
C
254 }
255}
bc584963 256
5efa5df2
C
257// ---------------------------------------------------------------------------
258// Buttons & form controls
259// ---------------------------------------------------------------------------
000eb0e4 260
947d0102
RK
261.btn-outline-secondary {
262 border-color: $input-border-color;
263
264 &:focus-within,
265 &:focus,
266 &:hover {
267 color: #fff;
268 background-color: #6c757d;
269 }
270}
271
a8454bb2 272.btn-group.select-button {
2accfdd8
C
273 font-weight: $font-semibold;
274
275 .active {
276 @include orange-button;
277 }
278
279 :not(.active) {
280 @include grey-button;
281 }
282
283 > * {
284 @include peertube-button-link;
285
286 box-shadow: none !important;
287
288 &:not(:first-child) {
289 border-top-left-radius: 0 !important;
290 border-bottom-left-radius: 0 !important;
291 }
292
293 &:not(:last-child) {
294 border-top-right-radius: 0 !important;
295 border-bottom-right-radius: 0 !important;
296 }
297 }
298}
299
a6d5ff76
RK
300.form-control {
301 font-size: 15px;
e66883b3
RK
302 color: pvar(--mainForegroundColor);
303 background-color: pvar(--inputBackgroundColor);
a6d5ff76
RK
304 outline: none;
305
5efa5df2 306 // Input box-shadow on focus
a6d5ff76
RK
307 &:focus-within,
308 &:focus {
e66883b3 309 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
a6d5ff76
RK
310
311 &.input-error {
6a4c30de 312 box-shadow: #{$focus-box-shadow-form} #{scale-color($red, $alpha: -75%)};
a6d5ff76
RK
313 }
314 }
315}
947d0102 316
0d3a2982 317.input-group {
4c8749cb
C
318 > .btn,
319 > .input-group-text {
320 height: $button-height;
0d3a2982 321 }
931d3430 322
4c8749cb
C
323 > .input-group-text {
324 font-size: 15px;
325 line-height: normal;
326 opacity: 0.9;
0d3a2982
RK
327 }
328
4c8749cb
C
329 .input-group-text > .dropdown-toggle {
330 display: flex;
331 }
332
333 .last-in-group {
334 border-top-right-radius: 3px !important;
335 border-bottom-right-radius: 3px !important;
0d3a2982 336 }
947d0102 337}
25a42e29 338
4c8749cb 339.has-clear {
25a42e29
RK
340 position: relative;
341
342 input {
27bc9586 343 @include padding-right(1.5rem !important);
25a42e29
RK
344 }
345
346 .form-control-clear {
347 color: rgba(0, 0, 0, 0.4);
25a42e29
RK
348 display: flex;
349 justify-content: center;
350 align-items: center;
351 position: absolute;
352 right: .5rem;
353 height: 95%;
4f5d0459 354 font-size: 14px;
25a42e29
RK
355
356 &:hover {
357 color: rgba(0, 0, 0, 0.7);
358 cursor: pointer;
359 }
360 }
361
362 input:placeholder-shown + .form-control-clear {
363 display: none;
364 }
365}