Use prettier for SCSS (#3895)
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / style / layout / containerList.scss
... / ...
CommitLineData
1.containerList {
2 > li {
3 position: relative;
4 transition: background-color 0.2s;
5
6 @include screen-md-down {
7 padding: 10px 0;
8 }
9
10 @include screen-lg {
11 padding: 20px;
12 }
13
14 &:not(:last-child) {
15 border-bottom: 1px solid $wcfContentBorderInner;
16 }
17
18 &:first-child {
19 border-top: 1px solid $wcfContentBorder;
20 }
21
22 &:last-child {
23 border-bottom: 1px solid $wcfContentBorder;
24 }
25
26 &:hover {
27 background-color: $wcfTabularBoxBackgroundActive;
28 }
29
30 &.showMore {
31 text-align: center;
32
33 &:hover {
34 background-color: transparent;
35 }
36 }
37
38 .containerHeadline {
39 position: relative;
40
41 > .containerContentType {
42 color: $wcfContentDimmedText;
43 position: absolute;
44 top: 5px;
45 right: 0;
46
47 @include screen-xs {
48 display: none;
49 }
50 }
51 }
52
53 &.containerListButtonGroup {
54 text-align: right;
55
56 &:hover {
57 background-color: transparent;
58 }
59
60 > .buttonGroup {
61 display: inline-flex;
62
63 &:not(:first-child) {
64 margin-left: 5px;
65 }
66 }
67
68 > .recentActivityFollowedNoResults {
69 text-align: left;
70 }
71 }
72
73 @include screen-md-down {
74 .hasMobileNavigation > .containerHeadline > h3 {
75 padding-right: 30px;
76 }
77
78 .buttonGroupNavigation {
79 position: absolute;
80 right: 0;
81 top: 14px;
82
83 &.open {
84 left: 0;
85
86 // dropdown is contained within this element, required to have it stand
87 // above any succeeding siblings
88 z-index: 10;
89
90 > .buttonList {
91 display: block;
92 visibility: visible;
93 }
94 }
95
96 > .dropdownLabel {
97 left: calc(100% - 24px);
98 position: relative;
99 }
100
101 > .buttonList {
102 @include dropdownMenu;
103
104 position: static !important;
105 top: 0;
106
107 > li {
108 .invisible {
109 display: inline;
110 padding-left: 5px;
111 }
112 }
113 }
114 }
115 }
116
117 @include screen-lg {
118 .buttonGroupNavigation {
119 opacity: 0;
120 position: absolute;
121 right: 20px;
122 top: 15px;
123 transition: opacity 0.12s;
124
125 > .dropdownLabel {
126 display: none;
127 }
128
129 > ul {
130 background-color: $wcfContentBackground;
131 border: 1px solid rgba(0, 0, 0, 0.15);
132 border-radius: 6px;
133
134 > li {
135 margin-right: 0;
136
137 &:not(:last-child) {
138 border-right: 1px solid rgba(0, 0, 0, 0.15);
139 }
140
141 > a {
142 display: inline-block;
143 padding: 3px 5px;
144
145 > .icon,
146 > .invisible {
147 color: rgba(0, 0, 0, 0.5);
148 }
149 }
150
151 &.active,
152 &:hover {
153 > a {
154 > .icon,
155 > .invisible {
156 color: $wcfContentText;
157 }
158 }
159 }
160 }
161 }
162 }
163
164 &:hover .buttonGroupNavigation {
165 opacity: 1;
166 }
167 }
168 }
169
170 @include screen-sm-down {
171 &.doubleColumned,
172 &.tripleColumned {
173 > li + li {
174 margin-top: 10px;
175 }
176 }
177 }
178
179 @include screen-md-up {
180 &.doubleColumned,
181 &.tripleColumned {
182 display: flex;
183 flex-wrap: wrap;
184
185 > li {
186 // this will cause the mobile drop-down menu to be cut-off
187 // overflow: hidden;
188 padding-right: 15px;
189
190 .containerBoxContent {
191 overflow: hidden;
192
193 h3 {
194 overflow: hidden;
195 text-overflow: ellipsis;
196 white-space: nowrap;
197 }
198 }
199
200 &:first-child {
201 border-top: none;
202 }
203
204 &:last-child {
205 border-bottom: none;
206 }
207 }
208
209 border-top: 1px solid $wcfContentBorder;
210 border-bottom: 1px solid $wcfContentBorder;
211 }
212
213 &.doubleColumned > li {
214 flex: 0 0 50%;
215 max-width: 50%;
216
217 &:nth-child(2n + 1):nth-last-child(-n + 2) {
218 border-bottom: none;
219 }
220 }
221
222 &.tripleColumned > li {
223 /* The `flex` shorthand fails in IE11 if `calc()` is used. */
224 flex-grow: 0;
225 flex-shrink: 0;
226 flex-basis: calc(100% / 3);
227
228 &:nth-child(3n + 1):nth-last-child(-n + 3),
229 &:nth-child(3n + 1):nth-last-child(-n + 3) ~ li {
230 border-bottom: none;
231 }
232 }
233 }
234}
235
236.containerBoxList {
237 @include screen-sm-down {
238 &.doubleColumned,
239 &.tripleColumned {
240 > li + li {
241 margin-top: 10px;
242 }
243 }
244 }
245
246 @include screen-md-up {
247 &.doubleColumned,
248 &.tripleColumned {
249 display: flex;
250 flex-wrap: wrap;
251 margin-bottom: -15px;
252
253 > li {
254 overflow: hidden;
255 padding-right: 15px;
256 margin-bottom: 15px;
257
258 .containerBoxContent {
259 overflow: hidden;
260
261 h3 {
262 overflow: hidden;
263 text-overflow: ellipsis;
264 white-space: nowrap;
265 }
266 }
267 }
268 }
269
270 &.doubleColumned > li {
271 flex: 0 0 50%;
272 max-width: 50%;
273 }
274
275 &.tripleColumned > li {
276 /* The `flex` shorthand fails in IE11 if `calc()` is used. */
277 flex-grow: 0;
278 flex-shrink: 0;
279 flex-basis: calc(100% / 3);
280 }
281 }
282}
283
284.recentActivityList {
285 .box48 {
286 max-height: 500px;
287 overflow: hidden;
288
289 > a:first-child {
290 align-self: flex-start;
291 }
292 }
293}
294
295.flexibleCategoryList {
296 position: relative;
297
298 > li {
299 margin-bottom: 14px;
300
301 > ol {
302 margin-left: 21px;
303 }
304
305 > ol > li > ol {
306 margin-bottom: 7px;
307 margin-left: 21px;
308
309 > li {
310 font-size: $wcfFontSizeSmall;
311 }
312 }
313 }
314}
315
316.containerListDisplayOptions {
317 align-items: center;
318 border-bottom: 2px solid currentColor;
319 color: $wcfTabularBoxHeadline;
320 display: flex;
321}
322
323.containerListSortOptions,
324.containerListActiveFilters,
325.containerListFilterOptions {
326 padding: 5px 10px;
327}
328
329@include screen-sm-down {
330 .containerListActiveFilters {
331 display: none;
332 }
333}
334
335.containerListSortOptions {
336 flex: 1 auto;
337
338 > .dropdown {
339 margin-left: 10px;
340 }
341}
342
343.containerListActiveFilters,
344.containerListFilterOptions {
345 flex: 0 auto;
346}
347
348@include screen-md-up {
349 .flexibleCategoryList:not(.flexibleCategoryListDisabled) {
350 /* WebKit */
351 -webkit-column-count: 2;
352
353 /* Firefox */
354 -moz-column-count: 2;
355
356 /* CSS 3 / Internet Explorer */
357 column-count: 2;
358
359 > li {
360 /* WebKit */
361 -webkit-column-break-inside: avoid;
362
363 /* CSS 3 / Internet Explorer */
364 break-inside: avoid;
365
366 > ol > li > ol {
367 font-size: 0;
368
369 > li {
370 display: inline-block;
371 @include wcfFontSmall;
372 }
373 }
374 }
375 }
376
377 /* Firefox */
378 @-moz-document url-prefix() {
379 .flexibleCategoryList:not(.flexibleCategoryListDisabled) > li {
380 display: block;
381 overflow: hidden;
382 }
383 }
384}
385
386@include screen-md-down {
387 .styleList > li {
388 padding: 10px;
389 }
390}