]>
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; | |
adcf9212 CC |
115 | } |
116 | ||
d235f6b0 C |
117 | label { |
118 | font-weight: $font-bold; | |
4c8749cb | 119 | margin-bottom: 0.5rem; |
09223546 C |
120 | } |
121 | ||
fd9c3c8d | 122 | code { |
123 | background-color: pvar(--greyBackgroundColor); | |
a742b4b0 | 124 | color: pvar(--greyForegroundColor); |
fd9c3c8d | 125 | border-radius: 3px; |
126 | padding: .2em .4em; | |
127 | margin: auto .4em; | |
128 | font-size: 75%; | |
129 | display: inline-block; | |
130 | vertical-align: middle; | |
131 | } | |
132 | ||
383bfc83 | 133 | .main-col { |
27bc9586 C |
134 | @include margin-left($menu-width); |
135 | ||
c4741804 | 136 | width: calc(100% - #{$menu-width}); |
a6d5ff76 | 137 | outline: none; |
9bf9d2a5 | 138 | |
c30745f3 | 139 | .margin-content { |
27bc9586 | 140 | margin: 0 pvar(--horizontalMarginContent); |
b34a444e | 141 | flex-grow: 1; |
c30745f3 C |
142 | } |
143 | ||
144 | .sub-menu { | |
218f730c | 145 | background-color: pvar(--submenuBackgroundColor); |
c30745f3 | 146 | width: 100%; |
c30745f3 C |
147 | display: flex; |
148 | align-items: center; | |
27bc9586 | 149 | padding: 0 pvar(--horizontalMarginContent); |
7034b3c9 | 150 | height: $sub-menu-height; |
151 | margin-bottom: $sub-menu-margin-bottom; | |
d7941370 | 152 | overflow-x: auto; |
ae2dd046 C |
153 | |
154 | &.sub-menu-fixed { | |
ae2dd046 | 155 | position: fixed; |
d6eace77 | 156 | z-index: #{z('sub-menu') - 1}; |
d7941370 | 157 | max-width: pvar(--mainColWidth); |
a949f676 | 158 | } |
c30745f3 C |
159 | } |
160 | ||
7034b3c9 | 161 | // Use an appropriate offset top when sub-menu fixed |
162 | .margin-content.offset-content { | |
163 | padding-top: $sub-menu-height + $sub-menu-margin-bottom; | |
164 | } | |
165 | ||
c30745f3 C |
166 | // Override some properties if the main content is expanded (no menu on the left) |
167 | &.expanded { | |
d7941370 C |
168 | --horizontalMarginContent: #{$expanded-horizontal-margins}; |
169 | --mainColWidth: 100vw; | |
170 | ||
27bc9586 | 171 | @include margin-left(0); |
c4741804 | 172 | width: 100%; |
602eb142 | 173 | } |
b15fe00f | 174 | |
931d3430 | 175 | &.lock-scroll .main-row > router-outlet + * { /* stylelint-disable-line selector-max-compound-selectors */ |
b15fe00f K |
176 | // Lock and hide body scrollbars |
177 | position: fixed; | |
178 | ||
179 | // Lock and hide sub-menu scrollbars | |
931d3430 | 180 | .sub-menu { /* stylelint-disable-line */ |
b15fe00f K |
181 | overflow-x: hidden; |
182 | } | |
183 | } | |
383bfc83 | 184 | } |
602eb142 | 185 | |
fb4fd623 C |
186 | // In tables, don't have a hover different background |
187 | table { | |
221489ca C |
188 | my-edit-button, |
189 | my-delete-button { | |
190 | .action-button { | |
191 | &:hover, | |
192 | &:active, | |
193 | &:focus, | |
194 | &[disabled], | |
195 | &.disabled { | |
196 | background-color: pvar(--greyBackgroundColor) !important; | |
197 | opacity: 0.8; | |
198 | } | |
fb4fd623 C |
199 | } |
200 | } | |
201 | } | |
202 | ||
c2faa073 | 203 | my-global-icon[iconName=external-link] { |
5b0ec7cd C |
204 | margin: 0 0.3em; |
205 | width: 0.9em; | |
206 | height: 0.9em; | |
207 | display: inline-block; | |
c2faa073 | 208 | color: pvar(--inputPlaceholderColor); |
5b0ec7cd C |
209 | position: relative; |
210 | top: -0.1em; | |
c2faa073 C |
211 | } |
212 | ||
165ee292 | 213 | @media screen and (max-width: #{breakpoint(xxl)}) { |
0f7407d9 | 214 | .main-col { |
134006b0 | 215 | --horizontalMarginContent: #{math.div($not-expanded-horizontal-margins, 2)}; |
931d3430 | 216 | --videosHorizontalMarginContent: 30px; |
0f7407d9 C |
217 | |
218 | &.expanded { | |
134006b0 | 219 | --horizontalMarginContent: #{math.div($expanded-horizontal-margins, 2)}; |
0f7407d9 | 220 | } |
2303a803 RK |
221 | } |
222 | } | |
223 | ||
165ee292 | 224 | @media screen and (max-width: #{breakpoint(lg)}) { |
0a6785d1 C |
225 | .main-col { |
226 | --videosHorizontalMarginContent: #{pvar(--horizontalMarginContent)}; | |
227 | } | |
228 | ||
7a4fd56c | 229 | /* the following applies from 500px to 900px and is partially overridden from 500px to 800px by changes below to $small-view */ |
d7941370 C |
230 | .main-col, |
231 | .main-col.expanded { | |
134006b0 | 232 | --horizontalMarginContent: #{math.div($expanded-horizontal-margins, 3)}; |
dd778941 | 233 | |
d7941370 | 234 | .sub-menu { |
27bc9586 | 235 | padding: 0 50px; |
22a16e36 | 236 | |
d7941370 C |
237 | .title-page { |
238 | font-size: 17px; | |
dd778941 | 239 | } |
1f788f20 C |
240 | } |
241 | } | |
242 | } | |
243 | ||
1f6d2449 | 244 | @media screen and (min-width: $mobile-view) and (max-width: $small-view) { |
ac6ac4e2 | 245 | .main-col { |
246 | width: 100%; | |
247 | } | |
248 | } | |
249 | ||
8ff3f883 | 250 | @media screen and (max-width: $small-view) { |
d7941370 C |
251 | .main-col, |
252 | .main-col.expanded { | |
253 | --horizontalMarginContent: 15px; | |
b15fe00f | 254 | |
27bc9586 | 255 | @include margin-left(0); |
7a03209d | 256 | |
d7941370 C |
257 | .sub-menu { |
258 | width: 100vw; | |
27bc9586 | 259 | padding: 0 15px; |
d7941370 C |
260 | margin-bottom: $sub-menu-margin-bottom-small-view; |
261 | overflow-x: auto; | |
165ee292 K |
262 | } |
263 | ||
d7941370 C |
264 | // Use an appropriate offset top when sub-menu fixed |
265 | .margin-content.offset-content { | |
266 | padding-top: $sub-menu-height + $sub-menu-margin-bottom-small-view; | |
165ee292 | 267 | } |
165ee292 | 268 | |
d7941370 C |
269 | my-markdown-textarea { |
270 | .root { | |
271 | max-width: 100% !important; | |
272 | } | |
165ee292 | 273 | } |
165ee292 | 274 | |
d7941370 C |
275 | input[type=text], |
276 | input[type=password], | |
277 | input[type=email], | |
278 | textarea, | |
279 | .peertube-select-container { | |
280 | flex-grow: 1; | |
165ee292 | 281 | } |
8544d8f5 | 282 | |
d7941370 C |
283 | .caption input[type=text] { |
284 | width: unset !important; | |
285 | flex-grow: 1; | |
7a03209d K |
286 | } |
287 | } | |
288 | } |