]>
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 | ||
e89cbbdf C |
13 | @import './bootstrap'; |
14 | @import './primeng-custom'; | |
15 | ||
26da644e C |
16 | @import './z-index'; |
17 | ||
383bfc83 C |
18 | [hidden] { |
19 | display: none !important; | |
20 | } | |
a64668c0 | 21 | |
b33f657c | 22 | body { |
dcbc29d5 | 23 | /*** theme ***/ |
4f926722 | 24 | // now beware sass requires interpolation |
dcbc29d5 | 25 | // for css custom properties #{$var} |
680b5496 RK |
26 | --mainColor: #{$main-color}; |
27 | --mainColorLighter: #{$main-color-lighter}; | |
a6d5ff76 | 28 | --mainColorLightest: #{$main-color-lightest}; |
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 C |
48 | --inputPlaceholderColor: #{$input-placeholder-color}; |
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); | |
b34a444e | 70 | font-size: 14px; |
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; | |
adcf9212 CC |
116 | } |
117 | ||
d235f6b0 C |
118 | label { |
119 | font-weight: $font-bold; | |
120 | font-size: 15px; | |
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 C |
205 | my-global-icon[iconName=external-link] { |
206 | margin: 0 3px; | |
207 | width: 13px; | |
208 | vertical-align: text-bottom; | |
209 | color: pvar(--inputPlaceholderColor); | |
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 | } |