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