Use prettier for SCSS (#3895)
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / style / ui / article.scss
1 .articleTeaser {
2 @include wcfFontBold;
3 }
4
5 .articleTeaser + .tableOfContentsWrapper {
6 margin-top: 20px;
7 }
8
9 .articleTeaserContainer + .section,
10 .articleImageContainer + .section {
11 margin-top: 20px !important;
12 }
13
14 .articleImage,
15 .contentCoverPhotoImage {
16 /* work-around for IE 11 to properly align the image if overflowing */
17 display: flex;
18 flex-wrap: wrap;
19
20 .articleImageWrapper,
21 .contentCoverPhotoImageWrapper {
22 align-items: center;
23 border-radius: 3px;
24 box-shadow: 0 0 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
25 display: flex;
26 max-height: 300px;
27 overflow: hidden;
28 width: 100%;
29
30 img {
31 height: auto !important;
32 width: 100% !important;
33 }
34 }
35
36 figcaption {
37 color: $wcfContentDimmedText;
38 flex: 1 0 100%;
39 margin-top: 5px;
40 text-align: center;
41
42 @include wcfFontSmall;
43 }
44 }
45
46 .articleContent {
47 .articleTagList {
48 margin-top: 20px;
49 }
50
51 .articleLikeSection {
52 align-items: center;
53 }
54
55 .articleLikeButtons {
56 justify-content: flex-end;
57
58 .invisible {
59 display: inline;
60 }
61 }
62
63 .articleLikesSummery:not(:empty),
64 .articleLikeButtons:not(:empty) {
65 margin-top: 20px;
66 }
67
68 .anchorFixedHeader:target::before {
69 content: "";
70 display: block;
71 height: 50px;
72 margin-top: -50px;
73 }
74 }
75
76 .articleAboutAuthor {
77 .articleAboutAuthorText {
78 font-style: italic;
79 }
80
81 .articleAboutAuthorUsername {
82 margin-top: 5px;
83
84 .username {
85 @include wcfFontHeadline;
86 }
87
88 .userTitleBadge {
89 top: -2px;
90 }
91 }
92 }
93
94 .articleNavigation {
95 @include screen-md-up {
96 > nav > ul {
97 display: flex;
98 }
99 }
100
101 .previousArticleButton,
102 .nextArticleButton {
103 display: flex;
104
105 @include screen-md-up {
106 flex: 0 0 50%;
107 }
108
109 > a {
110 color: $wcfContentText;
111 display: flex;
112
113 &::before {
114 align-self: center;
115 display: block;
116 flex: 0 0 auto;
117 font-family: FontAwesome;
118 font-size: 36px;
119 }
120
121 > div {
122 flex: 1 1 auto;
123 }
124
125 .articleNavigationEntityName,
126 .articleNavigationArticleTitle {
127 display: block;
128 }
129
130 .articleNavigationEntityName {
131 text-transform: uppercase;
132 }
133
134 .articleNavigationArticleTitle {
135 margin-top: 3px;
136
137 @include wcfFontHeadline;
138 }
139
140 .articleNavigationArticleImage {
141 > img {
142 border-radius: 2px;
143 opacity: 0.85;
144 transition: 0.2s ease opacity;
145 }
146 }
147
148 &:hover {
149 &::before {
150 color: $wcfContentLinkActive;
151 }
152
153 .articleNavigationArticleTitle {
154 color: $wcfContentLinkActive;
155 }
156
157 .articleNavigationArticleImage {
158 > img {
159 opacity: 1;
160 }
161 }
162 }
163 }
164 }
165
166 .previousArticleButton {
167 @include screen-md-up {
168 padding-right: 10px;
169 }
170
171 > a {
172 &::before {
173 content: $fa-var-chevron-left;
174 }
175
176 > div {
177 margin-left: 10px;
178 }
179 }
180 }
181
182 .nextArticleButton {
183 justify-content: flex-end;
184 text-align: right;
185
186 @include screen-md-up {
187 margin-left: 50%;
188 padding-left: 10px;
189 }
190
191 .articleNavigationArticleImage {
192 order: 1;
193 margin-left: 15px;
194 margin-right: 0;
195 }
196
197 > a {
198 &::before {
199 content: $fa-var-chevron-right;
200 order: 1;
201 }
202
203 > div {
204 margin-right: 10px;
205 }
206 }
207 }
208
209 .previousArticleButton + .nextArticleButton {
210 @include screen-sm-down {
211 margin-top: 20px;
212 }
213
214 @include screen-md-up {
215 margin-left: 0;
216 }
217 }
218 }
219
220 /* fix icons in rtl design */
221 html[dir="rtl"] {
222 .articleNavigation {
223 .previousArticleButton {
224 > a {
225 &::before {
226 content: $fa-var-chevron-right;
227 }
228 }
229 }
230
231 .nextArticleButton {
232 > a {
233 &::before {
234 content: $fa-var-chevron-left;
235 }
236 }
237 }
238 }
239 }
240
241 .articleList {
242 .articleListMetaData {
243 color: $wcfContentDimmedText;
244 margin-top: 2px;
245
246 .icon {
247 color: inherit;
248 }
249 }
250
251 a {
252 color: inherit;
253
254 &:hover {
255 color: inherit;
256
257 .articleListImage > img {
258 opacity: 1;
259 }
260
261 .articleListTitle {
262 color: $wcfContentLinkActive;
263 }
264 }
265 }
266
267 .articleListImage > img {
268 border-radius: 2px;
269 opacity: 0.85;
270 transition: 0.2s ease opacity;
271 }
272
273 > li:not(:first-child) {
274 margin-top: 30px;
275 }
276
277 @include screen-xs {
278 .box128 > .articleListImage {
279 margin-right: 10px;
280 }
281
282 .articleListImage > img {
283 height: 64px !important;
284 width: 64px !important;
285 }
286 }
287 }
288
289 .boxesFooterBoxes {
290 .articleList {
291 display: flex;
292 flex-wrap: wrap;
293 margin: 0 -5px -20px -5px;
294
295 > li {
296 margin: 0 5px 20px 5px;
297 }
298
299 .articleListImage > img {
300 height: auto !important;
301 max-width: 280px;
302 width: 100% !important;
303 }
304
305 .articleListImage + .articleListTitle {
306 margin-top: 5px;
307 }
308
309 .articleListMetaData {
310 display: none;
311 }
312 }
313
314 @include screen-lg {
315 .articleList {
316 > li {
317 /* The `flex` shorthand fails in IE11 if `calc()` is used. */
318 flex-grow: 0;
319 flex-shrink: 0;
320 flex-basis: calc(100% / 3 - 10px);
321 }
322 }
323
324 .boxFullWidth {
325 .articleList {
326 > li {
327 /* The `flex` shorthand fails in IE11 if `calc()` is used. */
328 flex-grow: 0;
329 flex-shrink: 0;
330 flex-basis: calc(100% / 6 - 10px);
331 }
332 }
333 }
334 }
335
336 @include screen-sm-up {
337 .articleList {
338 > li {
339 /* The `flex` shorthand fails in IE11 if `calc()` is used. */
340 flex-grow: 0;
341 flex-shrink: 0;
342 flex-basis: calc(100% / 3 - 10px);
343 }
344 }
345 }
346
347 @include screen-xs {
348 .articleList {
349 justify-content: center;
350
351 > li {
352 width: 280px;
353 }
354 }
355 }
356 }