]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/application.scss
Migrate to @peertube/videojs-contextmenu
[github/Chocobozzz/PeerTube.git] / client / src / sass / application.scss
CommitLineData
161b061d 1$icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
63c4db6d 2
134006b0
C
3@use 'sass:math';
4
8cbc40b2
C
5@use '_variables' as *;
6@use '_mixins' as *;
dcbc29d5 7
fa12eacc 8@use '_fonts';
63c4db6d 9
fa12eacc 10@use './classes';
100d9ce2 11
24893b52
C
12@use './custom-markup';
13
e89cbbdf
C
14@use './ng-select';
15
16// Needs an import because we extends glyphicon icons in primeng
17@import './bootstrap';
18@import './primeng-custom';
19
383bfc83
C
20[hidden] {
21 display: none !important;
22}
a64668c0 23
b33f657c 24body {
dcbc29d5 25 /*** theme ***/
4f926722 26 // now beware sass requires interpolation
dcbc29d5 27 // for css custom properties #{$var}
680b5496
RK
28 --mainColor: #{$main-color};
29 --mainColorLighter: #{$main-color-lighter};
a6d5ff76 30 --mainColorLightest: #{$main-color-lightest};
680b5496 31 --mainHoverColor: #{$main-hover-color};
dcbc29d5
C
32 --mainBackgroundColor: #{$bg-color};
33 --mainForegroundColor: #{$fg-color};
680b5496 34 --secondaryColor: #{$secondary-color};
2fcc2294 35
c123027f 36 --greyForegroundColor: #{$grey-foreground-color};
441e453a 37 --greyBackgroundColor: #{$grey-background-color};
c123027f 38
1d9d9cfd
RK
39 --menuBackgroundColor: #{$menu-background};
40 --menuForegroundColor: #{$menu-color};
60c35932 41
218f730c 42 --submenuBackgroundColor: #{$sub-menu-background-color};
60c35932 43 --channelBackgroundColor: #{$channel-background-color};
2fcc2294 44
3bf07dd8 45 --inputForegroundColor: #{$input-foreground-color};
14aa8556 46 --inputBackgroundColor: #{$input-background-color};
dcbc29d5
C
47 --inputPlaceholderColor: #{$input-placeholder-color};
48
3bf07dd8 49 --textareaForegroundColor: #{$textarea-foreground-color};
b15fe00f 50 --textareaBackgroundColor: #{$textarea-background-color};
f33dc6ab 51 --markdownTextareaBackgroundColor: #{$markdown-textarea-background-color};
b15fe00f 52
0240da5c
RK
53 --actionButtonColor: #{$grey-foreground-color};
54 --supportButtonBackgroundColor: #{transparent};
e66883b3 55 --supportButtonColor: #{pvar(--actionButtonColor)};
0240da5c 56 --supportButtonHeartColor: #{$support-button-heart};
2fcc2294 57
5f57df54
C
58 --activatedActionButtonColor: #{$activated-action-button-color};
59
d7941370 60 --horizontalMarginContent: #{$not-expanded-horizontal-margins};
0f7407d9 61 --videosHorizontalMarginContent: 6vw;
d7941370 62 --mainColWidth: calc(100vw - #{$menu-width});
10846ef6 63
8a8e02a4 64 font-family: $main-fonts;
b33f657c 65 font-weight: $font-regular;
e66883b3
RK
66 color: pvar(--mainForegroundColor);
67 background-color: pvar(--mainBackgroundColor);
b34a444e 68 font-size: 14px;
8110705d 69 // On desktop browsers, make sure vertical scroll bar is always visible
70 // Allow to disable the scrollbar instead of hide it when the content fit the body
71 // And not move the content and header horizontally sticked to right when the content is updating
72 overflow-y: scroll;
27bc9586
C
73
74 // Fix "reboot" style that set text-align: left
75 text-align: start;
b33f657c
C
76}
77
52cc0d54 78::selection {
e66883b3
RK
79 color: pvar(--mainBackgroundColor);
80 background-color: pvar(--mainHoverColor);
52cc0d54
RK
81}
82
2ca72354 83noscript,
73e09f27 84#incompatible-browser {
2ca72354
CE
85 display: block;
86 font-size: 1.2rem;
87 max-width: 600px;
88 margin: 1rem auto;
73e09f27
C
89}
90
07fa4c97
C
91strong {
92 font-weight: $font-semibold;
93}
94
383bfc83
C
95input.readonly {
96 /* Force blank on readonly inputs */
e66883b3 97 background-color: pvar(--inputBackgroundColor) !important;
0ac5edd9 98}
99
931d3430
C
100input,
101textarea {
63347a0f 102 outline: none;
84065945 103 color: pvar(--inputForegroundColor);
63347a0f
C
104}
105
adcf9212 106button {
adcf9212 107 @include disable-outline;
931d3430
C
108
109 background: unset;
adcf9212
CC
110}
111
d235f6b0
C
112label {
113 font-weight: $font-bold;
114 font-size: 15px;
09223546
C
115}
116
fd9c3c8d 117code {
118 background-color: pvar(--greyBackgroundColor);
a742b4b0 119 color: pvar(--greyForegroundColor);
fd9c3c8d 120 border-radius: 3px;
121 padding: .2em .4em;
122 margin: auto .4em;
123 font-size: 75%;
124 display: inline-block;
125 vertical-align: middle;
126}
127
7f28f2dd
C
128.form-error,
129.form-warning {
a2b817d3 130 display: block;
a2b817d3
C
131 margin-top: 5px;
132}
133
7f28f2dd
C
134.form-error {
135 color: $red;
136}
137
931d3430 138.input-error,
f8b530e0 139my-input-toggle-hidden ::ng-deep input {
41a676db 140 border-color: $red !important;
a2b817d3
C
141}
142
931d3430 143.full-width {
2d9fea16 144 width: 100%;
27bc9586 145 margin: 0 auto;
2d9fea16
RK
146 max-width: initial;
147}
148
383bfc83 149.glyphicon-black {
931d3430 150 color: #000;
383bfc83
C
151}
152
c4741804 153.row {
947d0102 154 margin: 0 !important;
c4741804
RK
155}
156
383bfc83 157.main-col {
27bc9586
C
158 @include margin-left($menu-width);
159
c4741804 160 width: calc(100% - #{$menu-width});
a6d5ff76 161 outline: none;
9bf9d2a5 162
c30745f3 163 .margin-content {
27bc9586 164 margin: 0 pvar(--horizontalMarginContent);
b34a444e 165 flex-grow: 1;
c30745f3
C
166 }
167
168 .sub-menu {
218f730c 169 background-color: pvar(--submenuBackgroundColor);
c30745f3 170 width: 100%;
c30745f3
C
171 display: flex;
172 align-items: center;
27bc9586 173 padding: 0 pvar(--horizontalMarginContent);
7034b3c9 174 height: $sub-menu-height;
175 margin-bottom: $sub-menu-margin-bottom;
d7941370 176 overflow-x: auto;
ae2dd046
C
177
178 &.sub-menu-fixed {
ae2dd046 179 position: fixed;
d6eace77 180 z-index: #{z('sub-menu') - 1};
d7941370 181 max-width: pvar(--mainColWidth);
a949f676 182 }
c30745f3
C
183 }
184
7034b3c9 185 // Use an appropriate offset top when sub-menu fixed
186 .margin-content.offset-content {
187 padding-top: $sub-menu-height + $sub-menu-margin-bottom;
188 }
189
c30745f3
C
190 // Override some properties if the main content is expanded (no menu on the left)
191 &.expanded {
d7941370
C
192 --horizontalMarginContent: #{$expanded-horizontal-margins};
193 --mainColWidth: 100vw;
194
27bc9586 195 @include margin-left(0);
c4741804 196 width: 100%;
602eb142 197 }
b15fe00f 198
931d3430 199 &.lock-scroll .main-row > router-outlet + * { /* stylelint-disable-line selector-max-compound-selectors */
b15fe00f
K
200 // Lock and hide body scrollbars
201 position: fixed;
202
203 // Lock and hide sub-menu scrollbars
931d3430 204 .sub-menu { /* stylelint-disable-line */
b15fe00f
K
205 overflow-x: hidden;
206 }
207 }
383bfc83 208}
602eb142 209
59aa1e5e 210.title-page {
931d3430 211 @include disable-default-a-behaviour;
27bc9586 212 @include margin-right(55px);
931d3430 213
ed5bb517 214 opacity: 0.6;
e66883b3 215 color: pvar(--mainForegroundColor);
59aa1e5e
C
216 font-size: 16px;
217 display: inline-block;
59aa1e5e 218 font-weight: $font-semibold;
ed5bb517
K
219 border-bottom: 2px solid transparent;
220
221 &.title-page-single {
59aa1e5e
C
222 margin-top: 30px;
223 margin-bottom: 25px;
224 }
cadb46d8 225
d6ed9ccc 226 &.active {
ed5bb517 227 border-bottom-color: pvar(--mainColor);
d6ed9ccc
RK
228 }
229
230 &.title-page-single {
231 font-size: 125%;
232 }
233
931d3430
C
234 &:hover,
235 &:active,
236 &:focus {
e66883b3 237 color: pvar(--mainForegroundColor);
04e0fc48 238 }
1952a538 239
931d3430
C
240 &.active,
241 &:hover,
242 &:active,
243 &:focus,
244 &.title-page-single {
ed5bb517 245 opacity: 1;
931d3430 246 outline: 0 hidden !important;
ed5bb517
K
247 }
248
ece3029b 249 @media screen and (max-width: $mobile-view) {
27bc9586 250 @include margin-left(15px);
1952a538 251 }
cadb46d8 252}
04e0fc48 253
482fa503
RK
254.title-page-about,
255.title-page-settings {
e61151b0 256 white-space: nowrap;
482fa503 257 font-size: 115%;
482fa503
RK
258}
259
cd83ea1b
C
260.admin-sub-header {
261 display: flex;
262 align-items: center;
263 margin-bottom: 30px;
264
08c1efbe 265 .form-sub-title {
cd83ea1b
C
266 flex-grow: 1;
267 }
65b247dd
C
268
269 .admin-sub-nav a {
270 @include disable-default-a-behaviour;
271
272 font-size: 16px;
e66883b3 273 color: pvar(--mainForegroundColor);
65b247dd
C
274 padding: 5px 15px;
275 border-radius: 0.25rem;
ed5bb517
K
276 font-weight: $font-semibold;
277 opacity: 0.6;
65b247dd
C
278
279 &.active {
218f730c 280 background-color: pvar(--submenuBackgroundColor);
ed5bb517
K
281 }
282
931d3430
C
283 &.active,
284 &:hover,
285 &:active,
286 &:focus {
ed5bb517 287 opacity: 1;
65b247dd
C
288 }
289 }
cd83ea1b
C
290}
291
08c1efbe 292.form-sub-title {
04e0fc48
C
293 font-size: 20px;
294 font-weight: bold;
59aa1e5e
C
295}
296
fb4fd623
C
297// In tables, don't have a hover different background
298table {
931d3430
C
299 .action-button-edit,
300 .action-button-delete {
301 &:hover,
302 &:active,
303 &:focus,
304 &[disabled],
305 &.disabled {
457bb213 306 background-color: $grey-background-color !important;
fb4fd623
C
307 }
308 }
309}
310
2d3741d6
C
311.no-results {
312 height: 40vh;
22839330
RK
313 max-height: 500px;
314
2d3741d6 315 display: flex;
82f443de 316 flex-direction: column;
2d3741d6
C
317 align-items: center;
318 justify-content: center;
319 font-size: 16px;
320 font-weight: $font-semibold;
321}
322
eb7c7a51
RK
323.dropdown-item {
324 @include dropdown-with-icon-item;
325
326 my-global-icon {
327 width: 22px;
328 height: 22px;
329 }
330}
331
7034b3c9 332/* offsetTop for scrollToAnchor */
333
45e0d669
RK
334.anchor {
335 position: relative;
7034b3c9 336 top: #{-($header-height + 20px)};
337}
338
339.offset-content { // if sub-menu fixed
340 .anchor {
341 top: #{-($header-height + $sub-menu-height + 20px)};
342 }
45e0d669
RK
343}
344
c29039e7
C
345.form-group-description {
346 @extend .text-muted;
347
348 font-size: 90%;
349 margin-top: 10px;
350}
351
4872e946
C
352ngx-loading-bar {
353 z-index: z(header) + 1 !important;
354}
355
165ee292 356@media screen and (max-width: #{breakpoint(xxl)}) {
0f7407d9 357 .main-col {
134006b0 358 --horizontalMarginContent: #{math.div($not-expanded-horizontal-margins, 2)};
931d3430 359 --videosHorizontalMarginContent: 30px;
0f7407d9
C
360
361 &.expanded {
134006b0 362 --horizontalMarginContent: #{math.div($expanded-horizontal-margins, 2)};
0f7407d9 363 }
2303a803
RK
364 }
365}
366
165ee292 367@media screen and (max-width: #{breakpoint(lg)}) {
0a6785d1
C
368 .main-col {
369 --videosHorizontalMarginContent: #{pvar(--horizontalMarginContent)};
370 }
371
1def3c52 372 /* the following applies from 500px to 900px and is partially overriden from 500px to 800px by changes below to $small-view */
d7941370
C
373 .main-col,
374 .main-col.expanded {
134006b0 375 --horizontalMarginContent: #{math.div($expanded-horizontal-margins, 3)};
dd778941 376
d7941370 377 .sub-menu {
27bc9586 378 padding: 0 50px;
22a16e36 379
d7941370
C
380 .title-page {
381 font-size: 17px;
dd778941 382 }
1f788f20
C
383 }
384 }
385}
386
1f6d2449 387@media screen and (min-width: $mobile-view) and (max-width: $small-view) {
ac6ac4e2 388 .main-col {
389 width: 100%;
390 }
391}
392
8ff3f883 393@media screen and (max-width: $small-view) {
d7941370
C
394 .main-col,
395 .main-col.expanded {
396 --horizontalMarginContent: 15px;
b15fe00f 397
27bc9586 398 @include margin-left(0);
7a03209d 399
d7941370
C
400 .sub-menu {
401 width: 100vw;
27bc9586 402 padding: 0 15px;
d7941370
C
403 margin-bottom: $sub-menu-margin-bottom-small-view;
404 overflow-x: auto;
165ee292
K
405 }
406
d7941370
C
407 // Use an appropriate offset top when sub-menu fixed
408 .margin-content.offset-content {
409 padding-top: $sub-menu-height + $sub-menu-margin-bottom-small-view;
165ee292 410 }
165ee292 411
d7941370 412 .admin-sub-header {
bc4c9cc1
C
413 flex-direction: column;
414
415 .form-sub-title {
27bc9586
C
416 @include margin-right(0 !important);
417
bc4c9cc1
C
418 margin-bottom: 10px;
419 text-align: center;
420 }
421
422 .admin-sub-nav {
423 display: block;
424 overflow-x: auto;
425 white-space: nowrap;
426 height: 50px;
427 padding: 10px 0;
428 width: 100%;
429
430 a {
27bc9586 431 @include margin-left(5px);
bc4c9cc1
C
432 }
433 }
165ee292
K
434 }
435
d7941370
C
436 my-markdown-textarea {
437 .root {
438 max-width: 100% !important;
439 }
165ee292 440 }
165ee292 441
d7941370
C
442 input[type=text],
443 input[type=password],
444 input[type=email],
445 textarea,
446 .peertube-select-container {
447 flex-grow: 1;
165ee292 448 }
8544d8f5 449
d7941370
C
450 .caption input[type=text] {
451 width: unset !important;
452 flex-grow: 1;
7a03209d
K
453 }
454 }
455}