]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/sass/bootstrap.scss
Remove secondary color theme
[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-group.select-button {
268 font-weight: $font-semibold;
269
270 .active {
271 @include orange-button;
272 }
273
274 :not(.active) {
275 @include grey-button;
276 }
277
278 > * {
279 @include peertube-button-link;
280
281 box-shadow: none !important;
282
283 &:not(:first-child) {
284 border-top-left-radius: 0 !important;
285 border-bottom-left-radius: 0 !important;
286 }
287
288 &:not(:last-child) {
289 border-top-right-radius: 0 !important;
290 border-bottom-right-radius: 0 !important;
291 }
292 }
293 }
294
295 // input box-shadow on focus
296 .form-control {
297 font-size: 15px;
298 color: pvar(--mainForegroundColor);
299 background-color: pvar(--inputBackgroundColor);
300 outline: none;
301
302 &:focus-within,
303 &:focus {
304 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
305
306 &.input-error {
307 box-shadow: #{$focus-box-shadow-form} #{scale-color($red, $alpha: -75%)};
308 }
309 }
310 }
311
312 .input-group {
313 > .btn,
314 > .input-group-text {
315 height: $button-height;
316 }
317
318 > .input-group-text {
319 font-size: 15px;
320 line-height: normal;
321 opacity: 0.9;
322 }
323
324 .input-group-text > .dropdown-toggle {
325 display: flex;
326 }
327
328 .last-in-group {
329 border-top-right-radius: 3px !important;
330 border-bottom-right-radius: 3px !important;
331 }
332 }
333
334 .has-clear {
335 position: relative;
336
337 input {
338 @include padding-right(1.5rem !important);
339 }
340
341 .form-control-clear {
342 color: rgba(0, 0, 0, 0.4);
343 display: flex;
344 justify-content: center;
345 align-items: center;
346 position: absolute;
347 right: .5rem;
348 height: 95%;
349 font-size: 14px;
350
351 &:hover {
352 color: rgba(0, 0, 0, 0.7);
353 cursor: pointer;
354 }
355 }
356
357 input:placeholder-shown + .form-control-clear {
358 display: none;
359 }
360 }