]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/application.scss
Add ability to preview embed in share modal
[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
f1c86172 95input[readonly] {
383bfc83 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
65b247dd
C
265 .admin-sub-nav a {
266 @include disable-default-a-behaviour;
267
268 font-size: 16px;
e66883b3 269 color: pvar(--mainForegroundColor);
65b247dd
C
270 padding: 5px 15px;
271 border-radius: 0.25rem;
ed5bb517
K
272 font-weight: $font-semibold;
273 opacity: 0.6;
65b247dd
C
274
275 &.active {
218f730c 276 background-color: pvar(--submenuBackgroundColor);
ed5bb517
K
277 }
278
931d3430
C
279 &.active,
280 &:hover,
281 &:active,
282 &:focus {
ed5bb517 283 opacity: 1;
65b247dd
C
284 }
285 }
cd83ea1b
C
286}
287
fb4fd623
C
288// In tables, don't have a hover different background
289table {
931d3430
C
290 .action-button-edit,
291 .action-button-delete {
292 &:hover,
293 &:active,
294 &:focus,
295 &[disabled],
296 &.disabled {
457bb213 297 background-color: $grey-background-color !important;
fb4fd623
C
298 }
299 }
300}
301
2d3741d6
C
302.no-results {
303 height: 40vh;
22839330
RK
304 max-height: 500px;
305
2d3741d6 306 display: flex;
82f443de 307 flex-direction: column;
2d3741d6
C
308 align-items: center;
309 justify-content: center;
310 font-size: 16px;
311 font-weight: $font-semibold;
312}
313
eb7c7a51
RK
314.dropdown-item {
315 @include dropdown-with-icon-item;
316
317 my-global-icon {
318 width: 22px;
319 height: 22px;
320 }
321}
322
7034b3c9 323/* offsetTop for scrollToAnchor */
324
45e0d669
RK
325.anchor {
326 position: relative;
7034b3c9 327 top: #{-($header-height + 20px)};
328}
329
330.offset-content { // if sub-menu fixed
331 .anchor {
332 top: #{-($header-height + $sub-menu-height + 20px)};
333 }
45e0d669
RK
334}
335
c29039e7
C
336.form-group-description {
337 @extend .text-muted;
338
339 font-size: 90%;
340 margin-top: 10px;
341}
342
4872e946
C
343ngx-loading-bar {
344 z-index: z(header) + 1 !important;
345}
346
165ee292 347@media screen and (max-width: #{breakpoint(xxl)}) {
0f7407d9 348 .main-col {
134006b0 349 --horizontalMarginContent: #{math.div($not-expanded-horizontal-margins, 2)};
931d3430 350 --videosHorizontalMarginContent: 30px;
0f7407d9
C
351
352 &.expanded {
134006b0 353 --horizontalMarginContent: #{math.div($expanded-horizontal-margins, 2)};
0f7407d9 354 }
2303a803
RK
355 }
356}
357
165ee292 358@media screen and (max-width: #{breakpoint(lg)}) {
0a6785d1
C
359 .main-col {
360 --videosHorizontalMarginContent: #{pvar(--horizontalMarginContent)};
361 }
362
1def3c52 363 /* the following applies from 500px to 900px and is partially overriden from 500px to 800px by changes below to $small-view */
d7941370
C
364 .main-col,
365 .main-col.expanded {
134006b0 366 --horizontalMarginContent: #{math.div($expanded-horizontal-margins, 3)};
dd778941 367
d7941370 368 .sub-menu {
27bc9586 369 padding: 0 50px;
22a16e36 370
d7941370
C
371 .title-page {
372 font-size: 17px;
dd778941 373 }
1f788f20
C
374 }
375 }
376}
377
1f6d2449 378@media screen and (min-width: $mobile-view) and (max-width: $small-view) {
ac6ac4e2 379 .main-col {
380 width: 100%;
381 }
382}
383
8ff3f883 384@media screen and (max-width: $small-view) {
d7941370
C
385 .main-col,
386 .main-col.expanded {
387 --horizontalMarginContent: 15px;
b15fe00f 388
27bc9586 389 @include margin-left(0);
7a03209d 390
d7941370
C
391 .sub-menu {
392 width: 100vw;
27bc9586 393 padding: 0 15px;
d7941370
C
394 margin-bottom: $sub-menu-margin-bottom-small-view;
395 overflow-x: auto;
165ee292
K
396 }
397
d7941370
C
398 // Use an appropriate offset top when sub-menu fixed
399 .margin-content.offset-content {
400 padding-top: $sub-menu-height + $sub-menu-margin-bottom-small-view;
165ee292 401 }
165ee292 402
d7941370 403 .admin-sub-header {
bc4c9cc1
C
404 flex-direction: column;
405
bc4c9cc1
C
406 .admin-sub-nav {
407 display: block;
408 overflow-x: auto;
409 white-space: nowrap;
410 height: 50px;
411 padding: 10px 0;
412 width: 100%;
413
414 a {
27bc9586 415 @include margin-left(5px);
bc4c9cc1
C
416 }
417 }
165ee292
K
418 }
419
d7941370
C
420 my-markdown-textarea {
421 .root {
422 max-width: 100% !important;
423 }
165ee292 424 }
165ee292 425
d7941370
C
426 input[type=text],
427 input[type=password],
428 input[type=email],
429 textarea,
430 .peertube-select-container {
431 flex-grow: 1;
165ee292 432 }
8544d8f5 433
d7941370
C
434 .caption input[type=text] {
435 width: unset !important;
436 flex-grow: 1;
7a03209d
K
437 }
438 }
439}