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