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