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