]>
Commit | Line | Data |
---|---|---|
1 | $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; | |
2 | ||
3 | @use 'sass:math'; | |
4 | ||
5 | @use '_variables' as *; | |
6 | @use '_mixins' as *; | |
7 | ||
8 | @use '_fonts'; | |
9 | ||
10 | @use './classes'; | |
11 | ||
12 | @use './custom-markup'; | |
13 | ||
14 | @use './ng-select'; | |
15 | ||
16 | // Needs an import because we extends glyphicon icons in primeng | |
17 | @import './bootstrap'; | |
18 | @import './primeng-custom'; | |
19 | ||
20 | @import './z-index'; | |
21 | ||
22 | [hidden] { | |
23 | display: none !important; | |
24 | } | |
25 | ||
26 | body { | |
27 | /*** theme ***/ | |
28 | // now beware sass requires interpolation | |
29 | // for css custom properties #{$var} | |
30 | --mainColor: #{$main-color}; | |
31 | --mainColorLighter: #{$main-color-lighter}; | |
32 | --mainColorLightest: #{$main-color-lightest}; | |
33 | ||
34 | --mainHoverColor: #{$main-hover-color}; | |
35 | --mainBackgroundHoverColor: #{$main-background-hover-color}; | |
36 | ||
37 | --mainBackgroundColor: #{$bg-color}; | |
38 | --mainForegroundColor: #{$fg-color}; | |
39 | ||
40 | --greyForegroundColor: #{$grey-foreground-color}; | |
41 | --greyBackgroundColor: #{$grey-background-color}; | |
42 | --greySecondaryBackgroundColor: #{$grey-background-hover-color}; | |
43 | ||
44 | --menuBackgroundColor: #{$menu-background}; | |
45 | --menuForegroundColor: #{$menu-color}; | |
46 | ||
47 | --submenuBackgroundColor: #{$sub-menu-background-color}; | |
48 | --channelBackgroundColor: #{$channel-background-color}; | |
49 | ||
50 | --inputForegroundColor: #{$input-foreground-color}; | |
51 | --inputBackgroundColor: #{$input-background-color}; | |
52 | --inputPlaceholderColor: #{$input-placeholder-color}; | |
53 | ||
54 | --textareaForegroundColor: #{$textarea-foreground-color}; | |
55 | --textareaBackgroundColor: #{$textarea-background-color}; | |
56 | --markdownTextareaBackgroundColor: #{$markdown-textarea-background-color}; | |
57 | ||
58 | --actionButtonColor: #{$grey-foreground-color}; | |
59 | ||
60 | --supportButtonBackgroundColor: #{transparent}; | |
61 | --supportButtonColor: #{pvar(--actionButtonColor)}; | |
62 | --supportButtonHeartColor: #{$support-button-heart}; | |
63 | ||
64 | --activatedActionButtonColor: #{$activated-action-button-color}; | |
65 | ||
66 | --horizontalMarginContent: #{$not-expanded-horizontal-margins}; | |
67 | --videosHorizontalMarginContent: 6vw; | |
68 | --mainColWidth: calc(100vw - #{$menu-width}); | |
69 | ||
70 | font-family: $main-fonts; | |
71 | font-weight: $font-regular; | |
72 | color: pvar(--mainForegroundColor); | |
73 | background-color: pvar(--mainBackgroundColor); | |
74 | font-size: 14px; | |
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; | |
79 | ||
80 | // Fix "reboot" style that set text-align: left | |
81 | text-align: start; | |
82 | } | |
83 | ||
84 | ::selection { | |
85 | color: pvar(--mainBackgroundColor); | |
86 | background-color: pvar(--mainHoverColor); | |
87 | } | |
88 | ||
89 | noscript, | |
90 | #incompatible-browser { | |
91 | display: block; | |
92 | font-size: 1.2rem; | |
93 | max-width: 600px; | |
94 | margin: 1rem auto; | |
95 | } | |
96 | ||
97 | a { | |
98 | text-decoration: none; | |
99 | } | |
100 | ||
101 | strong { | |
102 | font-weight: $font-semibold; | |
103 | } | |
104 | ||
105 | input[readonly] { | |
106 | /* Force blank on readonly inputs */ | |
107 | background-color: pvar(--inputBackgroundColor) !important; | |
108 | } | |
109 | ||
110 | input, | |
111 | textarea { | |
112 | outline: none; | |
113 | color: pvar(--inputForegroundColor); | |
114 | } | |
115 | ||
116 | button { | |
117 | @include disable-outline; | |
118 | ||
119 | background: unset; | |
120 | } | |
121 | ||
122 | label { | |
123 | font-weight: $font-bold; | |
124 | font-size: 15px; | |
125 | margin-bottom: 0.5rem; | |
126 | } | |
127 | ||
128 | code { | |
129 | background-color: pvar(--greyBackgroundColor); | |
130 | color: pvar(--greyForegroundColor); | |
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 | ||
139 | .form-group { | |
140 | margin-bottom: 1rem; | |
141 | } | |
142 | ||
143 | .form-error, | |
144 | .form-warning { | |
145 | display: block; | |
146 | margin-top: 5px; | |
147 | } | |
148 | ||
149 | .form-error { | |
150 | color: $red; | |
151 | } | |
152 | ||
153 | .input-error, | |
154 | my-input-text ::ng-deep input { | |
155 | border-color: $red !important; | |
156 | } | |
157 | ||
158 | .full-width { | |
159 | width: 100%; | |
160 | margin: 0 auto; | |
161 | max-width: initial; | |
162 | } | |
163 | ||
164 | .main-col { | |
165 | @include margin-left($menu-width); | |
166 | ||
167 | width: calc(100% - #{$menu-width}); | |
168 | outline: none; | |
169 | ||
170 | .margin-content { | |
171 | margin: 0 pvar(--horizontalMarginContent); | |
172 | flex-grow: 1; | |
173 | } | |
174 | ||
175 | .sub-menu { | |
176 | background-color: pvar(--submenuBackgroundColor); | |
177 | width: 100%; | |
178 | display: flex; | |
179 | align-items: center; | |
180 | padding: 0 pvar(--horizontalMarginContent); | |
181 | height: $sub-menu-height; | |
182 | margin-bottom: $sub-menu-margin-bottom; | |
183 | overflow-x: auto; | |
184 | ||
185 | &.sub-menu-fixed { | |
186 | position: fixed; | |
187 | z-index: #{z('sub-menu') - 1}; | |
188 | max-width: pvar(--mainColWidth); | |
189 | } | |
190 | } | |
191 | ||
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 | ||
197 | // Override some properties if the main content is expanded (no menu on the left) | |
198 | &.expanded { | |
199 | --horizontalMarginContent: #{$expanded-horizontal-margins}; | |
200 | --mainColWidth: 100vw; | |
201 | ||
202 | @include margin-left(0); | |
203 | width: 100%; | |
204 | } | |
205 | ||
206 | &.lock-scroll .main-row > router-outlet + * { /* stylelint-disable-line selector-max-compound-selectors */ | |
207 | // Lock and hide body scrollbars | |
208 | position: fixed; | |
209 | ||
210 | // Lock and hide sub-menu scrollbars | |
211 | .sub-menu { /* stylelint-disable-line */ | |
212 | overflow-x: hidden; | |
213 | } | |
214 | } | |
215 | } | |
216 | ||
217 | .title-page { | |
218 | @include disable-default-a-behaviour; | |
219 | @include margin-right(55px); | |
220 | ||
221 | opacity: 0.6; | |
222 | color: pvar(--mainForegroundColor); | |
223 | font-size: 16px; | |
224 | display: inline-block; | |
225 | font-weight: $font-semibold; | |
226 | border-bottom: 2px solid transparent; | |
227 | ||
228 | &.title-page-single { | |
229 | margin-top: 30px; | |
230 | margin-bottom: 25px; | |
231 | } | |
232 | ||
233 | &.active { | |
234 | border-bottom-color: pvar(--mainColor); | |
235 | } | |
236 | ||
237 | &.title-page-single { | |
238 | font-size: 125%; | |
239 | } | |
240 | ||
241 | &:hover, | |
242 | &:active, | |
243 | &:focus { | |
244 | color: pvar(--mainForegroundColor); | |
245 | } | |
246 | ||
247 | &.active, | |
248 | &:hover, | |
249 | &:active, | |
250 | &:focus, | |
251 | &.title-page-single { | |
252 | opacity: 1; | |
253 | outline: 0 hidden !important; | |
254 | } | |
255 | ||
256 | @media screen and (max-width: $mobile-view) { | |
257 | @include margin-left(15px); | |
258 | } | |
259 | } | |
260 | ||
261 | .title-page-about, | |
262 | .title-page-settings { | |
263 | white-space: nowrap; | |
264 | font-size: 115%; | |
265 | } | |
266 | ||
267 | .admin-sub-header { | |
268 | display: flex; | |
269 | align-items: center; | |
270 | margin-bottom: 30px; | |
271 | } | |
272 | ||
273 | // In tables, don't have a hover different background | |
274 | table { | |
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 | } | |
286 | } | |
287 | } | |
288 | } | |
289 | ||
290 | .no-results { | |
291 | height: 40vh; | |
292 | max-height: 500px; | |
293 | ||
294 | display: flex; | |
295 | flex-direction: column; | |
296 | align-items: center; | |
297 | justify-content: center; | |
298 | font-size: 16px; | |
299 | font-weight: $font-semibold; | |
300 | } | |
301 | ||
302 | .dropdown-item { | |
303 | @include dropdown-with-icon-item; | |
304 | ||
305 | my-global-icon { | |
306 | width: 22px; | |
307 | height: 22px; | |
308 | } | |
309 | } | |
310 | ||
311 | my-global-icon[iconName=external-link] { | |
312 | margin: 0 3px; | |
313 | width: 13px; | |
314 | vertical-align: text-bottom; | |
315 | color: pvar(--inputPlaceholderColor); | |
316 | } | |
317 | ||
318 | .chevron-down { | |
319 | @include chevron-down(0.55rem, 0.20em); | |
320 | ||
321 | margin: 0 5px; | |
322 | } | |
323 | ||
324 | .chevron-up { | |
325 | @include chevron-up(0.55rem, 0.20em); | |
326 | ||
327 | margin: 0 5px; | |
328 | } | |
329 | ||
330 | /* offsetTop for scrollToAnchor */ | |
331 | ||
332 | .anchor { | |
333 | position: relative; | |
334 | top: #{-($header-height + 20px)}; | |
335 | } | |
336 | ||
337 | .offset-content { // if sub-menu fixed | |
338 | .anchor { | |
339 | top: #{-($header-height + $sub-menu-height + 20px)}; | |
340 | } | |
341 | } | |
342 | ||
343 | .form-group-description { | |
344 | @extend .muted !optional; | |
345 | ||
346 | font-size: 90%; | |
347 | margin-top: 10px; | |
348 | } | |
349 | ||
350 | .callout { | |
351 | padding: 1.25rem; | |
352 | border: 1px solid #eee; | |
353 | border-radius: .25rem; | |
354 | position: relative; | |
355 | ||
356 | > label { | |
357 | position: relative; | |
358 | top: -5px; | |
359 | left: -10px; | |
360 | color: #6c757d !important; | |
361 | } | |
362 | ||
363 | &:not(.callout-light) { | |
364 | border-left-width: .25rem; | |
365 | } | |
366 | ||
367 | &.callout-info { | |
368 | border-color: pvar(--mainColorLightest); | |
369 | border-left-color: pvar(--mainColor); | |
370 | } | |
371 | } | |
372 | ||
373 | @media screen and (max-width: #{breakpoint(xxl)}) { | |
374 | .main-col { | |
375 | --horizontalMarginContent: #{math.div($not-expanded-horizontal-margins, 2)}; | |
376 | --videosHorizontalMarginContent: 30px; | |
377 | ||
378 | &.expanded { | |
379 | --horizontalMarginContent: #{math.div($expanded-horizontal-margins, 2)}; | |
380 | } | |
381 | } | |
382 | } | |
383 | ||
384 | @media screen and (max-width: #{breakpoint(lg)}) { | |
385 | .main-col { | |
386 | --videosHorizontalMarginContent: #{pvar(--horizontalMarginContent)}; | |
387 | } | |
388 | ||
389 | /* the following applies from 500px to 900px and is partially overridden from 500px to 800px by changes below to $small-view */ | |
390 | .main-col, | |
391 | .main-col.expanded { | |
392 | --horizontalMarginContent: #{math.div($expanded-horizontal-margins, 3)}; | |
393 | ||
394 | .sub-menu { | |
395 | padding: 0 50px; | |
396 | ||
397 | .title-page { | |
398 | font-size: 17px; | |
399 | } | |
400 | } | |
401 | } | |
402 | } | |
403 | ||
404 | @media screen and (min-width: $mobile-view) and (max-width: $small-view) { | |
405 | .main-col { | |
406 | width: 100%; | |
407 | } | |
408 | } | |
409 | ||
410 | @media screen and (max-width: $small-view) { | |
411 | .main-col, | |
412 | .main-col.expanded { | |
413 | --horizontalMarginContent: 15px; | |
414 | ||
415 | @include margin-left(0); | |
416 | ||
417 | .sub-menu { | |
418 | width: 100vw; | |
419 | padding: 0 15px; | |
420 | margin-bottom: $sub-menu-margin-bottom-small-view; | |
421 | overflow-x: auto; | |
422 | } | |
423 | ||
424 | // Use an appropriate offset top when sub-menu fixed | |
425 | .margin-content.offset-content { | |
426 | padding-top: $sub-menu-height + $sub-menu-margin-bottom-small-view; | |
427 | } | |
428 | ||
429 | .admin-sub-header { | |
430 | flex-direction: column; | |
431 | } | |
432 | ||
433 | my-markdown-textarea { | |
434 | .root { | |
435 | max-width: 100% !important; | |
436 | } | |
437 | } | |
438 | ||
439 | input[type=text], | |
440 | input[type=password], | |
441 | input[type=email], | |
442 | textarea, | |
443 | .peertube-select-container { | |
444 | flex-grow: 1; | |
445 | } | |
446 | ||
447 | .caption input[type=text] { | |
448 | width: unset !important; | |
449 | flex-grow: 1; | |
450 | } | |
451 | } | |
452 | } |