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