Added 'insert cms page' button
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / style / layout / box.scss
CommitLineData
bb6ef47e
MW
1/* default styling for all boxes */
2.box {
3 box-sizing: border-box;
4}
5
6.boxImage {
7 img {
8 max-width: 100%;
9 }
10}
11
12.boxTitle {
5908f54f 13 @include wcfFontHeadline;
bb6ef47e
MW
14
15 & + .boxContent {
95961bdf
MW
16 margin-top: 20px;
17 }
18
19 .badge {
20 top: -2px;
bb6ef47e
MW
21 }
22}
23
24.boxContent {
0b6161c6
MW
25 & + .boxContent {
26 margin-top: 20px;
27 }
28}
29
30.boxContent {
bb6ef47e 31 & + .boxTitle {
b4e94f83 32 margin-top: 30px;
bb6ef47e
MW
33 }
34}
35
0b6161c6
MW
36.boxContentSeparator {
37 background: $wcfContentBorderInner;
38 border: 0;
39 height: 1px;
40 margin: 30px auto;
41 width: 60%;
42}
43
bb6ef47e
MW
44/* styling for boxes in <hero> position */
45.boxesHero {
fd94097c
MW
46 .boxContainer {
47 @include screen-md-down {
48 padding: 40px 0;
49 }
50
51 @include screen-lg {
52 padding: 60px 0;
53 }
54 }
55
bb6ef47e 56 .box {
bb6ef47e 57 text-align: center;
fd94097c
MW
58
59 &:not(:last-child) {
60 @include screen-md-down {
61 margin-bottom: 40px;
62 }
63
64 @include screen-lg {
65 margin-bottom: 60px;
66 }
c5dd767e 67 }
bb6ef47e
MW
68 }
69
70 .boxTitle {
5908f54f 71 @include wcfFontTitle;
bb6ef47e
MW
72 }
73
74 .boxWithImage {
75 display: flex;
76 flex-wrap: wrap;
77
78 .boxImage,
79 .boxTitle,
80 .boxContent {
81 flex: 0 0 100%;
82 }
83
84 .boxImage {
fd94097c
MW
85 align-items: center;
86 display: flex;
87 justify-content: center;
88 max-height: 750px;
bb6ef47e 89 order: 3;
fd94097c
MW
90 overflow: hidden;
91
92 @include screen-md-down {
93 margin-top: 20px;
94 }
95
96 @include screen-lg {
97 margin-top: 30px;
98 }
bb6ef47e
MW
99 }
100 }
101}
102
103/* styling for boxes in <headerBoxes> position */
104.boxesHeaderBoxes {
0b6161c6
MW
105 background-color: $wcfFooterBoxBackground;
106 color: $wcfFooterBoxText;
107
108 a {
109 color: $wcfFooterBoxLink;
110
111 &:hover {
112 color: $wcfFooterBoxLinkActive;
0b6161c6
MW
113 }
114 }
115
116 .icon {
8b59f5ea 117 color: $wcfFooterBoxText;
0b6161c6 118 }
bb6ef47e 119
c734a302 120 .boxContainer {
fd94097c 121 @include screen-sm-up {
0b6161c6
MW
122 display: flex;
123 flex-wrap: wrap;
fd94097c
MW
124 }
125
126 @include screen-md-down {
0b6161c6 127 padding: 40px 0;
fd94097c 128 margin-bottom: -40px;
7102d090
AE
129 margin-left: -10px;
130 margin-right: -10px;
fd94097c
MW
131 }
132
133 @include screen-lg {
134 padding: 60px 0;
135 margin-bottom: -60px;
7102d090
AE
136 margin-left: -15px;
137 margin-right: -15px;
0b6161c6 138 }
bb6ef47e
MW
139 }
140
141 .box {
95961bdf 142 overflow: hidden;
fd94097c
MW
143 padding-left: 15px;
144 padding-right: 15px;
95961bdf 145
fd94097c
MW
146 @include screen-md-down {
147 margin-bottom: 40px;
148 }
149
150 @include screen-sm-md {
151 flex: 0 0 50%;
ce280017 152 max-width: 50%;
fd94097c
MW
153
154 &.boxFullWidth {
155 flex-basis: 100%;
ce280017 156 max-width: none;
fd94097c
MW
157 }
158
159 /* one item */
160 &:first-child:nth-last-child(1) {
161 flex-basis: 100%;
ce280017 162 max-width: none;
0b6161c6 163 }
bb6ef47e 164 }
937f57cf 165
fd94097c 166 @include screen-lg {
0b6161c6 167 flex: 0 0 25%;
fd94097c 168 margin-bottom: 60px;
ce280017 169 max-width: 25%;
0b6161c6
MW
170
171 &.boxFullWidth {
172 flex-basis: 100%;
ce280017 173 max-width: none;
0b6161c6
MW
174 }
175
176 /* one item */
177 &:first-child:nth-last-child(1) {
178 flex-basis: 100%;
ce280017 179 max-width: none;
0b6161c6
MW
180 }
181
182 /* two items */
183 &:first-child:nth-last-child(2),
184 &:first-child:nth-last-child(2) ~ .box {
185 flex-basis: 50%;
ce280017 186 max-width: 50%;
0b6161c6
MW
187 }
188
189 /* three items */
190 &:first-child:nth-last-child(3),
191 &:first-child:nth-last-child(3) ~ .box {
192 flex-basis: 33.3333%;
ce280017 193 max-width: 33.3333%;
0b6161c6 194 }
937f57cf 195 }
bb6ef47e
MW
196 }
197
198 .boxImage {
fd94097c
MW
199 align-items: center;
200 display: flex;
201 justify-content: center;
202 margin-bottom: 20px;
203 max-height: 100px;
204 overflow: hidden;
bb6ef47e
MW
205 }
206}
207
208/* styling for boxes in <top>/<bottom> position */
209.boxesTop,
210.boxesBottom {
bb6ef47e 211 .box {
fd94097c
MW
212 @include screen-md-down {
213 margin-bottom: 40px;
214 margin-top: 40px;
215 }
216
217 @include screen-lg {
218 margin-bottom: 60px;
219 margin-top: 60px;
220 }
bb6ef47e
MW
221 }
222
10ff3d63
MW
223 .boxTitle {
224 color: $wcfContentHeadlineText;
225
5908f54f 226 @include wcfFontSection;
10ff3d63
MW
227
228 a {
229 color: $wcfContentHeadlineLink;
230
231 &:hover {
232 color: $wcfContentHeadlineLinkActive;
233 }
234 }
235 }
236
fd94097c
MW
237 @include screen-xs {
238 .boxImage {
239 align-items: center;
240 display: flex;
241 justify-content: center;
242 margin-bottom: 20px;
243 max-height: 100px;
244 overflow: hidden;
bb6ef47e
MW
245 }
246 }
247
fd94097c
MW
248 @include screen-sm-up {
249 .boxImage {
250 width: 30%;
251 }
252
253 .boxWithImage {
254 @include clearfix;
255
256 &:nth-child(odd) {
257 .boxImage {
258 float: left;
259 }
260
261 .boxTitle,
262 .boxContent {
263 @include screen-md-down {
264 margin-left: calc(30% + 15px);
265 }
266
267 @include screen-lg {
268 margin-left: calc(30% + 30px);
269 }
270 }
271 }
272
273 &:nth-child(even) {
274 .boxImage {
275 float: right;
276 }
277
278 .boxTitle,
279 .boxContent {
280 @include screen-md-down {
281 margin-right: calc(30% + 15px);
282 }
283
284 @include screen-lg {
285 margin-right: calc(30% + 30px);
286 }
287 }
288 }
289 }
c5dd767e 290 }
bb6ef47e
MW
291}
292
293.boxesTop {
294 border-bottom: 1px solid $wcfContentBorderInner;
c5dd767e
MS
295}
296
bb6ef47e
MW
297.boxesBottom {
298 border-top: 1px solid $wcfContentBorderInner;
299}
300
301/* styling for boxes in <sidebarLeft>/<sidebarRight> position */
302.boxesSidebarLeft,
303.boxesSidebarRight {
304 color: $wcfSidebarText;
305
306 a {
307 color: $wcfSidebarLink;
308
bb6ef47e
MW
309 &:hover {
310 color: $wcfSidebarLinkActive;
8b59f5ea 311
bb6ef47e
MW
312 }
313 }
314
e4c07d67
AE
315 > .boxContainer {
316 @include screen-sm {
317 -webkit-columns: 2;
318 -moz-columns: 2;
319 columns: 2;
320 }
321
322 @include screen-md {
323 -webkit-columns: 3;
324 -moz-columns: 3;
325 columns: 3;
326 }
327
328 @include screen-sm-md {
fdf34eae 329 margin-bottom: -30px;
e4c07d67
AE
330
331 -webkit-column-gap: 30px;
332 -moz-column-gap: 30px;
333 column-gap: 30px;
334
335 > .box {
336 /* Sections should never be split, but Firefox, IE and Edge don't seem
337 to care about this despite advertising the support for it. We can work
338 around this by using `overflow: hidden` which magically does the job,
339 but doesn't affect Chrome which properly breaks anyway. */
340 overflow: hidden; /* Fix for Firefox, IE and Edge */
341
342 // WebKit fix
fdf34eae
AE
343 background-clip: padding-box;
344 border-bottom: 30px solid transparent;
345 display: block;
346 margin: 0 !important;
e4c07d67
AE
347 width: 100%;
348
349 -webkit-column-break-inside: avoid; /* Chrome, Safari, Opera */
350 page-break-inside: avoid; /* Firefox */
351 break-inside: avoid; /* IE 10+ */
352 }
353 }
354 }
355
8b59f5ea
MW
356 .icon {
357 color: $wcfSidebarText;
358 }
359
bb6ef47e
MW
360 small,
361 .dimmed {
362 color: $wcfSidebarDimmedText;
363
364 a {
365 color: $wcfSidebarDimmedLink;
366
367 &:hover {
368 color: $wcfSidebarDimmedLinkActive;
369 }
370 }
371 }
372
e9f3957f 373 .boxTitle {
d3925b67 374 color: $wcfSidebarHeadlineText;
e9f3957f 375
d3925b67
MW
376 a {
377 color: $wcfSidebarHeadlineLink;
378
379 &:hover {
380 color: $wcfSidebarHeadlineLinkActive;
381
382 }
e9f3957f
MW
383 }
384 }
385
bb6ef47e 386 .box {
0e8421c9
MW
387 &:not(.boxBorderless) {
388 background-color: $wcfSidebarBackground;
0e8421c9 389
f216765b
AE
390 @include screen-md-down {
391 padding: 20px 10px;
63e2f52f
AE
392
393 .boxMenu {
f216765b
AE
394 margin-left: -10px;
395 margin-right: -10px;
63e2f52f
AE
396 }
397 }
398
f216765b
AE
399 @include screen-lg {
400 padding: 20px;
63e2f52f
AE
401
402 .boxMenu {
f216765b
AE
403 margin-left: -20px;
404 margin-right: -20px;
63e2f52f 405 }
0e8421c9
MW
406 }
407 }
bb6ef47e
MW
408
409 &:not(:first-child) {
95961bdf 410 margin-top: 30px;
bb6ef47e 411 }
487db634 412
487db634
MW
413 &.boxError {
414 background-color: $wcfStatusErrorBackground;
415 color: $wcfStatusErrorText;
416 }
417
418 &.boxInfo {
419 background-color: $wcfStatusInfoBackground;
420 color: $wcfStatusInfoText;
421 }
422
423 &.boxSuccess {
424 background-color: $wcfStatusSuccessBackground;
425 color: $wcfStatusSuccessText;
426 }
427
428 &.boxWarning {
429 background-color: $wcfStatusWarningBackground;
430 color: $wcfStatusWarningText;
431 }
0e8421c9
MW
432
433 .boxMenu {
434 .boxMenuLink {
47115034
MW
435 align-items: flex-start;
436 display: flex;
0e8421c9
MW
437 padding: 5px 20px;
438
47115034
MW
439 .boxMenuLinkTitle {
440 flex: 1 1 auto;
441 }
442
0e8421c9 443 .badge {
47115034 444 flex: 0 0 auto;
0e8421c9
MW
445 }
446 }
447
448 li.active > .boxMenuLink {
449 background-color: $wcfContentBackground;
450 }
451
452 .boxMenuDepth1 .boxMenuLink {
453 padding-left: 40px;
454 }
455
456 .boxMenuDepth2 .boxMenuLink {
457 padding-left: 60px;
458 }
d9a5604a
AE
459
460 @include screen-md-down {
4af25ab6
MW
461 position: relative;
462
463 .boxMenuLink {
464 overflow: hidden;
465 text-overflow: ellipsis;
466 white-space: nowrap;
467 }
468
9384e330 469 &:not(.open):not(.forceOpen) {
4af25ab6
MW
470 > li:first-child,
471 > li.active:not(:first-child) {
472 pointer-events: none;
473
474 > a::after {
475 content: $fa-var-caret-down;
476 font-family: FontAwesome;
477 font-size: 14px;
478 margin-left: 7px;
479 }
dc6f1f37
AE
480
481 .boxMenuDepth1,
482 .boxMenuDepth2 {
483 position: relative;
484
485 > li {
486 &:not(.active) {
487 display: none;
488 }
489
490 &.active {
491 left: 0;
492 position: absolute;
493 right: 0;
494 top: 0;
495 transform: translateY(-100%);
496
497 > a::after {
498 content: $fa-var-caret-down;
499 font-family: FontAwesome;
500 font-size: 14px;
501 margin-left: 7px;
502 }
503 }
504 }
505 }
4af25ab6
MW
506 }
507
508 > li:first-child ~ li {
509 display: none;
510 }
511
512 > li.active:not(:first-child) {
513 display: block;
514 position: absolute;
515 left: 0;
516 right: 0;
517 top: 0;
518 }
519 }
d9a5604a 520 }
0e8421c9 521 }
bb6ef47e
MW
522 }
523
fd94097c
MW
524 @include screen-xs {
525 .boxImage {
526 align-items: center;
527 display: flex;
528 justify-content: center;
529 margin-bottom: 20px;
530 max-height: 100px;
531 overflow: hidden;
bb6ef47e
MW
532 }
533 }
534
fd94097c
MW
535 @include screen-sm-md {
536 .boxWithImage {
537 @include clearfix;
538
539 .boxTitle,
540 .boxContent {
541 margin-left: calc(30% + 15px);
542 }
543 }
544
545 .boxImage {
546 float: left;
547 width: 30%;
548 }
bb6ef47e 549 }
fd94097c
MW
550
551 @include screen-lg {
552 .boxImage {
553 align-items: center;
554 display: flex;
555 justify-content: center;
556 margin-bottom: 20px;
557 max-height: 100px;
558 overflow: hidden;
559 }
c5dd767e 560 }
bb6ef47e
MW
561}
562
cb49ffdb
AE
563.boxesSidebarLeft .box .boxMenu li.active > .boxMenuLink {
564 margin-left: 10px;
565 padding-left: 10px;
566}
567
568.boxesSidebarRight .box .boxMenu li.active > .boxMenuLink {
569 margin-right: 10px;
570 padding-right: 10px;
571}
572
bb6ef47e
MW
573/* styling for boxes in <contentTop>/<contentBottom> position */
574.boxesContentTop,
575.boxesContentBottom {
bb6ef47e
MW
576 .box {
577 &:not(:first-child) {
10ff3d63 578 margin-top: 40px;
bb6ef47e
MW
579 }
580 }
581
72a7f9cd
MW
582 .boxTitle {
583 color: $wcfContentHeadlineText;
584
5908f54f 585 @include wcfFontSection;
fd94097c 586
72a7f9cd
MW
587 a {
588 color: $wcfContentHeadlineLink;
589
590 &:hover {
591 color: $wcfContentHeadlineLinkActive;
592 }
593 }
594 }
595
fd94097c
MW
596 @include screen-xs {
597 .boxImage {
598 align-items: center;
599 display: flex;
600 justify-content: center;
601 margin-bottom: 20px;
602 max-height: 100px;
603 overflow: hidden;
604 }
bb6ef47e 605 }
fd94097c
MW
606
607 @include screen-sm-up {
608 .boxWithImage {
609 @include clearfix;
610
611 .boxTitle,
612 .boxContent {
613 @include screen-md-down {
614 margin-left: calc(30% + 15px);
615 }
616
617 @include screen-lg {
618 margin-left: calc(30% + 30px);
619 }
620 }
621 }
622
623 .boxImage {
624 float: left;
625 width: 30%;
626 }
c5dd767e 627 }
bb6ef47e
MW
628}
629
0b6161c6
MW
630.boxesContentTop:not(:first-child) {
631 margin-top: 40px;
bb6ef47e
MW
632}
633
634.boxesContentBottom {
10ff3d63 635 margin-top: 40px;
bb6ef47e
MW
636}
637
638/* styling for boxes in <footerBoxes> position */
639.boxesFooterBoxes {
640 background-color: $wcfFooterBoxBackground;
641 color: $wcfFooterBoxText;
bb6ef47e
MW
642
643 a {
644 color: $wcfFooterBoxLink;
645
bb6ef47e
MW
646 &:hover {
647 color: $wcfFooterBoxLinkActive;
bb6ef47e
MW
648 }
649 }
650
651 .icon {
652 color: $wcfFooterBoxText;
653 }
654
c734a302 655 .boxContainer {
f216765b 656 @include screen-sm-down {
fd94097c 657 padding: 40px 0;
f216765b
AE
658 }
659
7102d090
AE
660 @include screen-md-down {
661 margin-left: -10px;
662 margin-right: -10px;
663 }
664
f216765b 665 @include screen-md-up {
63e2f52f
AE
666 display: flex;
667 flex-wrap: wrap;
fd94097c
MW
668 margin-bottom: -60px;
669 padding: 60px 0;
c3d0938e 670 }
7102d090
AE
671
672 @include screen-lg {
673 margin-left: -15px;
674 margin-right: -15px;
675 }
bb6ef47e
MW
676 }
677
678 .box {
95961bdf 679 overflow: hidden;
fd94097c
MW
680 padding-left: 15px;
681 padding-right: 15px;
bb6ef47e 682
f216765b 683 @include screen-sm-down {
fd94097c
MW
684 &:not(:last-child) {
685 margin-bottom: 40px;
c5dd767e 686 }
f216765b
AE
687 }
688
689 @include screen-md-up {
63e2f52f 690 flex: 0 0 50%;
fd94097c 691 margin-bottom: 60px;
ce280017 692 max-width: 50%;
63e2f52f
AE
693
694 &.boxFullWidth {
695 flex-basis: 100%;
ce280017 696 max-width: none;
63e2f52f
AE
697 }
698 }
bb6ef47e
MW
699 }
700
72a7f9cd
MW
701 .boxTitle {
702 color: $wcfFooterBoxHeadlineText;
703
704 a {
705 color: $wcfFooterBoxHeadlineLink;
706
707 &:hover {
708 color: $wcfFooterBoxHeadlineLinkActive;
709 }
710 }
711 }
712
bb6ef47e 713 .boxImage {
fd94097c
MW
714 align-items: center;
715 display: flex;
716 justify-content: center;
717 margin-bottom: 20px;
718 max-height: 100px;
719 overflow: hidden;
bb6ef47e
MW
720 }
721}
722
723/* styling for boxes in <footer> position */
724.boxesFooter {
0b6161c6
MW
725 background-color: $wcfFooterBackground;
726 color: $wcfFooterText;
11f96819 727 padding: 20px 0;
0b6161c6
MW
728
729 .icon {
730 color: $wcfFooterText;
731 }
732
733 a {
734 color: $wcfFooterLink;
735
736 &:hover {
737 color: $wcfFooterLinkActive;
2a5ae89f 738 text-decoration: underline;
0b6161c6
MW
739 }
740 }
741
bb6ef47e
MW
742 .box {
743 &:not(:first-child) {
95961bdf 744 margin-top: 20px;
bb6ef47e
MW
745 }
746 }
747
25896feb
MW
748 .boxTitle {
749 color: $wcfFooterHeadlineText;
750
751 a {
752 color: $wcfFooterHeadlineLink;
753
754 &:hover {
755 color: $wcfFooterHeadlineLinkActive;
756 }
757 }
758 }
759
fd94097c
MW
760 @include screen-xs {
761 .boxImage {
762 align-items: center;
763 display: flex;
764 justify-content: center;
765 margin-bottom: 20px;
766 max-height: 100px;
767 overflow: hidden;
bb6ef47e
MW
768 }
769 }
770
fd94097c
MW
771 @include screen-sm-up {
772 .boxWithImage {
773 @include clearfix;
774
775 .boxTitle,
776 .boxContent {
777 @include screen-md-down {
778 margin-left: calc(30% + 15px);
779 }
780
781 @include screen-lg {
782 margin-left: calc(30% + 30px);
783 }
784 }
785 }
786
787 .boxImage {
788 float: left;
789 width: 30%;
790 }
bb6ef47e 791 }
948d7051 792
10159160
MW
793 .boxMenuLinkGroup {
794 .boxMenu {
795 > li {
796 > ol {
797 a {
798 // use text color instead
799 color: $wcfFooterText;
800 }
801 }
802 }
803 }
804 }
805
806 .styleChanger {
807 @include screen-sm-down {
808 display: none;
809 }
810
811 @include screen-md-up {
812 float: right;
813 padding-left: 20px;
814 }
815 }
816}
817
818.boxesTop,
819.boxesBottom,
820.boxesFooter {
948d7051 821 .boxMenu {
f2e6770c 822 display: inline-flex;
1ec71078 823 flex-wrap: wrap;
948d7051
MW
824 margin-left: -10px;
825 margin-right: -10px;
826
948d7051 827 > li {
f2e6770c 828 flex: 0 0 auto;
948d7051
MW
829 padding-left: 10px;
830 padding-right: 10px;
f2e6770c
MW
831 }
832 }
833
10159160 834 .boxMenuLinkGroup {
6063a7ec
AE
835 &:not(:first-child) {
836 margin-top: 40px;
837 }
838
f2e6770c
MW
839 .boxMenu {
840 display: flex;
841 flex-wrap: wrap;
842 margin-bottom: -20px;
948d7051 843
f2e6770c
MW
844 .boxMenuLink {
845 display: inline-block;
846 }
847
848 > li {
19275bb6
MW
849 @include screen-md-up {
850 flex: 0 0 25%;
851 max-width: 25%;
852 }
853
854 @include screen-sm-down {
855 flex: 1 1 100%;
856 }
857
f2e6770c
MW
858 margin-bottom: 20px;
859
948d7051 860 > .boxMenuLink {
5908f54f 861 @include wcfFontHeadline;
948d7051
MW
862
863 margin-bottom: 10px;
864 }
948d7051
MW
865 }
866 }
867 }
bb6ef47e 868}