]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/application.scss
Fix setting theme in client
[github/Chocobozzz/PeerTube.git] / client / src / sass / application.scss
CommitLineData
134006b0
C
1@use 'sass:math';
2
8cbc40b2
C
3@use '_variables' as *;
4@use '_mixins' as *;
93c728a2 5@use '_icons' as *;
dcbc29d5 6
fa12eacc 7@use '_fonts';
63c4db6d 8
f72c78b2 9@use './class-helpers';
24893b52 10@use './custom-markup';
e89cbbdf
C
11@use './ng-select';
12
e89cbbdf
C
13@import './bootstrap';
14@import './primeng-custom';
15
26da644e
C
16@import './z-index';
17
b33f657c 18body {
dcbc29d5 19 /*** theme ***/
4f926722 20 // now beware sass requires interpolation
dcbc29d5 21 // for css custom properties #{$var}
680b5496
RK
22 --mainColor: #{$main-color};
23 --mainColorLighter: #{$main-color-lighter};
a6d5ff76 24 --mainColorLightest: #{$main-color-lightest};
6f03f944 25 --mainColorVeryLight: #{$main-color-very-light};
b788e691 26
680b5496 27 --mainHoverColor: #{$main-hover-color};
b788e691
C
28 --mainBackgroundHoverColor: #{$main-background-hover-color};
29
dcbc29d5
C
30 --mainBackgroundColor: #{$bg-color};
31 --mainForegroundColor: #{$fg-color};
b788e691 32
c123027f 33 --greyForegroundColor: #{$grey-foreground-color};
441e453a 34 --greyBackgroundColor: #{$grey-background-color};
b788e691 35 --greySecondaryBackgroundColor: #{$grey-background-hover-color};
c123027f 36
1d9d9cfd
RK
37 --menuBackgroundColor: #{$menu-background};
38 --menuForegroundColor: #{$menu-color};
60c35932 39
218f730c 40 --submenuBackgroundColor: #{$sub-menu-background-color};
60c35932 41 --channelBackgroundColor: #{$channel-background-color};
2fcc2294 42
3bf07dd8 43 --inputForegroundColor: #{$input-foreground-color};
14aa8556 44 --inputBackgroundColor: #{$input-background-color};
dcbc29d5
C
45 --inputPlaceholderColor: #{$input-placeholder-color};
46
3bf07dd8 47 --textareaForegroundColor: #{$textarea-foreground-color};
b15fe00f 48 --textareaBackgroundColor: #{$textarea-background-color};
f33dc6ab 49 --markdownTextareaBackgroundColor: #{$markdown-textarea-background-color};
b15fe00f 50
0240da5c 51 --actionButtonColor: #{$grey-foreground-color};
b788e691 52
0240da5c 53 --supportButtonBackgroundColor: #{transparent};
e66883b3 54 --supportButtonColor: #{pvar(--actionButtonColor)};
0240da5c 55 --supportButtonHeartColor: #{$support-button-heart};
2fcc2294 56
5f57df54
C
57 --activatedActionButtonColor: #{$activated-action-button-color};
58
d7941370 59 --horizontalMarginContent: #{$not-expanded-horizontal-margins};
0f7407d9 60 --videosHorizontalMarginContent: 6vw;
d7941370 61 --mainColWidth: calc(100vw - #{$menu-width});
10846ef6 62
8a8e02a4 63 font-family: $main-fonts;
b33f657c 64 font-weight: $font-regular;
e66883b3
RK
65 color: pvar(--mainForegroundColor);
66 background-color: pvar(--mainBackgroundColor);
5b0ec7cd 67 font-size: 1rem;
8110705d 68 // On desktop browsers, make sure vertical scroll bar is always visible
69 // Allow to disable the scrollbar instead of hide it when the content fit the body
70 // And not move the content and header horizontally sticked to right when the content is updating
71 overflow-y: scroll;
27bc9586
C
72
73 // Fix "reboot" style that set text-align: left
74 text-align: start;
b33f657c
C
75}
76
52cc0d54 77::selection {
e66883b3
RK
78 color: pvar(--mainBackgroundColor);
79 background-color: pvar(--mainHoverColor);
52cc0d54
RK
80}
81
2ca72354 82noscript,
73e09f27 83#incompatible-browser {
2ca72354
CE
84 display: block;
85 font-size: 1.2rem;
86 max-width: 600px;
87 margin: 1rem auto;
73e09f27
C
88}
89
4c8749cb
C
90a {
91 text-decoration: none;
92}
93
07fa4c97
C
94strong {
95 font-weight: $font-semibold;
96}
97
f1c86172 98input[readonly] {
383bfc83 99 /* Force blank on readonly inputs */
e66883b3 100 background-color: pvar(--inputBackgroundColor) !important;
0ac5edd9 101}
102
931d3430
C
103input,
104textarea {
63347a0f 105 outline: none;
84065945 106 color: pvar(--inputForegroundColor);
63347a0f
C
107}
108
adcf9212 109button {
adcf9212 110 @include disable-outline;
931d3430
C
111
112 background: unset;
adcf9212
CC
113}
114
d235f6b0
C
115label {
116 font-weight: $font-bold;
4c8749cb 117 margin-bottom: 0.5rem;
09223546
C
118}
119
fd9c3c8d 120code {
121 background-color: pvar(--greyBackgroundColor);
a742b4b0 122 color: pvar(--greyForegroundColor);
fd9c3c8d 123 border-radius: 3px;
124 padding: .2em .4em;
125 margin: auto .4em;
126 font-size: 75%;
127 display: inline-block;
128 vertical-align: middle;
129}
130
383bfc83 131.main-col {
27bc9586
C
132 @include margin-left($menu-width);
133
c4741804 134 width: calc(100% - #{$menu-width});
a6d5ff76 135 outline: none;
9bf9d2a5 136
c30745f3 137 .margin-content {
27bc9586 138 margin: 0 pvar(--horizontalMarginContent);
b34a444e 139 flex-grow: 1;
c30745f3
C
140 }
141
142 .sub-menu {
218f730c 143 background-color: pvar(--submenuBackgroundColor);
c30745f3 144 width: 100%;
c30745f3
C
145 display: flex;
146 align-items: center;
27bc9586 147 padding: 0 pvar(--horizontalMarginContent);
7034b3c9 148 height: $sub-menu-height;
149 margin-bottom: $sub-menu-margin-bottom;
d7941370 150 overflow-x: auto;
ae2dd046
C
151
152 &.sub-menu-fixed {
ae2dd046 153 position: fixed;
d6eace77 154 z-index: #{z('sub-menu') - 1};
d7941370 155 max-width: pvar(--mainColWidth);
a949f676 156 }
c30745f3
C
157 }
158
7034b3c9 159 // Use an appropriate offset top when sub-menu fixed
160 .margin-content.offset-content {
161 padding-top: $sub-menu-height + $sub-menu-margin-bottom;
162 }
163
c30745f3
C
164 // Override some properties if the main content is expanded (no menu on the left)
165 &.expanded {
d7941370
C
166 --horizontalMarginContent: #{$expanded-horizontal-margins};
167 --mainColWidth: 100vw;
168
27bc9586 169 @include margin-left(0);
c4741804 170 width: 100%;
602eb142 171 }
b15fe00f 172
931d3430 173 &.lock-scroll .main-row > router-outlet + * { /* stylelint-disable-line selector-max-compound-selectors */
b15fe00f
K
174 // Lock and hide body scrollbars
175 position: fixed;
176
177 // Lock and hide sub-menu scrollbars
931d3430 178 .sub-menu { /* stylelint-disable-line */
b15fe00f
K
179 overflow-x: hidden;
180 }
181 }
383bfc83 182}
602eb142 183
fb4fd623
C
184// In tables, don't have a hover different background
185table {
221489ca
C
186 my-edit-button,
187 my-delete-button {
188 .action-button {
189 &:hover,
190 &:active,
191 &:focus,
192 &[disabled],
193 &.disabled {
194 background-color: pvar(--greyBackgroundColor) !important;
195 opacity: 0.8;
196 }
fb4fd623
C
197 }
198 }
199}
200
c2faa073 201my-global-icon[iconName=external-link] {
5b0ec7cd
C
202 margin: 0 0.3em;
203 width: 0.9em;
204 height: 0.9em;
205 display: inline-block;
c2faa073 206 color: pvar(--inputPlaceholderColor);
5b0ec7cd
C
207 position: relative;
208 top: -0.1em;
c2faa073
C
209}
210
165ee292 211@media screen and (max-width: #{breakpoint(xxl)}) {
0f7407d9 212 .main-col {
134006b0 213 --horizontalMarginContent: #{math.div($not-expanded-horizontal-margins, 2)};
931d3430 214 --videosHorizontalMarginContent: 30px;
0f7407d9
C
215
216 &.expanded {
134006b0 217 --horizontalMarginContent: #{math.div($expanded-horizontal-margins, 2)};
0f7407d9 218 }
2303a803
RK
219 }
220}
221
165ee292 222@media screen and (max-width: #{breakpoint(lg)}) {
0a6785d1
C
223 .main-col {
224 --videosHorizontalMarginContent: #{pvar(--horizontalMarginContent)};
225 }
226
7a4fd56c 227 /* the following applies from 500px to 900px and is partially overridden from 500px to 800px by changes below to $small-view */
d7941370
C
228 .main-col,
229 .main-col.expanded {
134006b0 230 --horizontalMarginContent: #{math.div($expanded-horizontal-margins, 3)};
dd778941 231
d7941370 232 .sub-menu {
27bc9586 233 padding: 0 50px;
22a16e36 234
d7941370
C
235 .title-page {
236 font-size: 17px;
dd778941 237 }
1f788f20
C
238 }
239 }
240}
241
1f6d2449 242@media screen and (min-width: $mobile-view) and (max-width: $small-view) {
ac6ac4e2 243 .main-col {
244 width: 100%;
245 }
246}
247
8ff3f883 248@media screen and (max-width: $small-view) {
d7941370
C
249 .main-col,
250 .main-col.expanded {
251 --horizontalMarginContent: 15px;
b15fe00f 252
27bc9586 253 @include margin-left(0);
7a03209d 254
d7941370
C
255 .sub-menu {
256 width: 100vw;
27bc9586 257 padding: 0 15px;
d7941370
C
258 margin-bottom: $sub-menu-margin-bottom-small-view;
259 overflow-x: auto;
165ee292
K
260 }
261
d7941370
C
262 // Use an appropriate offset top when sub-menu fixed
263 .margin-content.offset-content {
264 padding-top: $sub-menu-height + $sub-menu-margin-bottom-small-view;
165ee292 265 }
165ee292 266
d7941370
C
267 my-markdown-textarea {
268 .root {
269 max-width: 100% !important;
270 }
165ee292 271 }
165ee292 272
d7941370
C
273 input[type=text],
274 input[type=password],
275 input[type=email],
276 textarea,
277 .peertube-select-container {
278 flex-grow: 1;
165ee292 279 }
8544d8f5 280
d7941370
C
281 .caption input[type=text] {
282 width: unset !important;
283 flex-grow: 1;
7a03209d
K
284 }
285 }
286}