]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/sass/bootstrap.scss
Merge branch 'release/4.2.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / sass / bootstrap.scss
1 $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
2
3 @use '_variables' as *;
4 @use '_mixins' as *;
5
6 @import './_bootstrap-variables';
7
8 @import '~bootstrap/scss/functions';
9 @import '~bootstrap/scss/variables';
10 @import '~bootstrap/scss/mixins';
11 @import '~bootstrap/scss/utilities';
12
13 @import '~bootstrap/scss/root';
14 @import '~bootstrap/scss/reboot';
15 @import '~bootstrap/scss/type';
16 @import '~bootstrap/scss/grid';
17 @import '~bootstrap/scss/forms';
18 @import '~bootstrap/scss/buttons';
19 @import '~bootstrap/scss/dropdown';
20 @import '~bootstrap/scss/button-group';
21 @import '~bootstrap/scss/nav';
22 @import '~bootstrap/scss/card';
23 @import '~bootstrap/scss/accordion';
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';
29
30 @import '~bootstrap/scss/helpers';
31 @import '~bootstrap/scss/utilities/api';
32
33 @import '~@neos21/bootstrap3-glyphicons/assets/stylesheets/bootstrap3-glyphicons';
34
35 // Thanks https://gist.github.com/alexandrevicenzi/680147013e902a4eaa5d
36 .glyphicon-refresh-animate {
37 animation: spin 0.7s infinite linear;
38 }
39
40 .flex-auto {
41 flex: auto;
42 }
43
44 .c-hand {
45 cursor: pointer !important;
46 }
47
48 @keyframes spin {
49 from {
50 transform: scale(1) rotate(0deg);
51 }
52
53 to {
54 transform: scale(1) rotate(360deg);
55 }
56 }
57
58 .dropdown-menu {
59 font-size: 15px;
60 color: pvar(--mainForegroundColor);
61 background-color: pvar(--mainBackgroundColor);
62
63 .dropdown-header {
64 @include padding-left(1rem);
65 }
66
67 .dropdown-item {
68 padding: 3px 15px;
69
70 &.active {
71 color: pvar(--mainBackgroundColor) !important;
72 background-color: pvar(--mainHoverColor);
73 opacity: 0.9;
74 }
75
76 &::after {
77 display: none;
78 }
79 }
80
81 a {
82 @include disable-default-a-behaviour;
83 }
84 }
85
86 @media screen and (min-width: #{breakpoint(md)}) {
87 .modal::before {
88 vertical-align: middle;
89 content: ' ';
90 height: 100%;
91 }
92
93 .modal-dialog {
94 text-align: start;
95
96 &:not(.modal-lg):not(.modal-xl) {
97 min-width: 500px;
98 width: 40vw;
99 max-width: 900px;
100 }
101 }
102 }
103
104 .modal {
105 text-align: center;
106
107 .modal-content {
108 background-color: pvar(--mainBackgroundColor);
109 word-break: break-word;
110 }
111
112 .modal-header {
113 border-bottom: 0;
114 margin-bottom: 5px;
115
116 .modal-title {
117 font-size: 20px;
118 font-weight: $font-semibold;
119 }
120
121 my-global-icon {
122 @include icon(22px);
123
124 position: relative;
125 top: 5px;
126 float: right;
127
128 margin: 0;
129 padding: 0;
130 opacity: 0.5;
131
132 &[iconName=cross] { /* stylelint-disable-line selector-max-compound-selectors */
133 @include icon(16px);
134
135 top: -3px;
136 }
137 }
138 }
139
140 .inputs {
141 margin-bottom: 0;
142 text-align: end;
143
144 > *:not(:first-child) {
145 @include margin-left(10px);
146 }
147 }
148 }
149
150
151 // On desktop browsers, make the content and header horizontally sticked to right not move when modal open and close
152 .modal-open {
153 overflow-y: scroll !important; // Make sure vertical scroll bar is always visible on desktop browsers to get disabled scrollbar effect
154 width: 100vw; // Make sure the content fits all the available width
155 }
156
157 // On touchscreen devices, simply overflow: hidden to avoid detached overlay on scroll
158 @media (hover: none) and (pointer: coarse) {
159 .modal-open,
160 .menu-open {
161 overflow: hidden !important;
162 }
163
164 // On touchscreen devices display content overlay when opened menu
165 .menu-open {
166 .main-col {
167 &::before {
168 background-color: #000;
169 width: 100vw;
170 height: 100vh;
171 opacity: 0.75;
172 content: '';
173 display: block;
174 position: fixed;
175 z-index: z(overlay);
176 }
177 }
178 }
179 }
180
181 // Nav customizations
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.6 !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.6;
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 .card {
235 background-color: pvar(--mainBackgroundColor);
236 border-color: #dee2e6;
237 }
238
239 .collapse-transition {
240 // Animation when we show/hide the filters
241 transition: max-height 0.3s;
242 display: block !important;
243 overflow: hidden !important;
244 max-height: 0;
245
246 &.show {
247 max-height: 1500px;
248 overflow: inherit !important;
249 }
250 }
251
252 .dropdown-divider {
253 margin: 0.3rem 0;
254 }
255
256 .btn-outline-secondary {
257 border-color: $input-border-color;
258
259 &:focus-within,
260 &:focus,
261 &:hover {
262 color: #fff;
263 background-color: #6c757d;
264 }
265 }
266
267 .btn-outline-tertiary {
268 color: pvar(--secondaryColor);
269 border-color: pvar(--secondaryColor);
270
271 &:focus-within,
272 &:focus,
273 &:hover {
274 color: pvar(--mainBackgroundColor);
275 background-color: pvar(--secondaryColor);
276 }
277 }
278
279 .btn-group.select-button {
280 font-weight: $font-semibold;
281
282 .active {
283 @include orange-button;
284 }
285
286 :not(.active) {
287 @include grey-button;
288 }
289
290 > * {
291 @include peertube-button-link;
292
293 box-shadow: none !important;
294
295 &:not(:first-child) {
296 border-top-left-radius: 0 !important;
297 border-bottom-left-radius: 0 !important;
298 }
299
300 &:not(:last-child) {
301 border-top-right-radius: 0 !important;
302 border-bottom-right-radius: 0 !important;
303 }
304 }
305 }
306
307 // input box-shadow on focus
308 .form-control {
309 font-size: 15px;
310 color: pvar(--mainForegroundColor);
311 background-color: pvar(--inputBackgroundColor);
312 outline: none;
313
314 &:focus-within,
315 &:focus {
316 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
317
318 &.input-error {
319 box-shadow: #{$focus-box-shadow-form} #{scale-color($red, $alpha: -75%)};
320 }
321 }
322 }
323
324 .input-group {
325 > .btn,
326 > .input-group-text {
327 height: $button-height;
328 }
329
330 > .input-group-text {
331 font-size: 15px;
332 line-height: normal;
333 opacity: 0.9;
334 }
335
336 .input-group-text > .dropdown-toggle {
337 display: flex;
338 }
339
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 position: relative;
348
349 input {
350 @include padding-right(1.5rem !important);
351 }
352
353 .form-control-clear {
354 color: rgba(0, 0, 0, 0.4);
355 display: flex;
356 justify-content: center;
357 align-items: center;
358 position: absolute;
359 right: .5rem;
360 height: 95%;
361 font-size: 14px;
362
363 &:hover {
364 color: rgba(0, 0, 0, 0.7);
365 cursor: pointer;
366 }
367 }
368
369 input:placeholder-shown + .form-control-clear {
370 display: none;
371 }
372 }