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