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