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