blob: f10cec39a2943d01918c34f3fe0c4b30a0d6c1ca [file] [log] [blame]
Akronbaba3b62021-11-22 17:24:48 +01001@use 'sass:math';
Akron7e5afce2020-08-25 15:50:19 +02002@import "lengths";
3@import "mixins";
4
Akron2f979122018-07-25 17:00:23 +02005/**
6 * This defines flexible table cells
Akron7e5afce2020-08-25 15:50:19 +02007 * for views (including media queries).
Akron2f979122018-07-25 17:00:23 +02008 */
9
10dl.flex {
11 display: flex;
12 flex-direction: row;
13 flex-wrap: wrap;
14 justify-content: flex-start;
15 align-items: stretch;
16 width: auto;
17 padding-bottom: 0;
18
19 > div {
20 display: flex;
21 flex-direction: row;
22 text-align: center;
23 width: 100%;
Akronbaba3b62021-11-22 17:24:48 +010024 border-width: math.div($border-size,2);
Akron2f979122018-07-25 17:00:23 +020025 border-style: solid;
26 align-items: stretch;
27 > * {
28 @include cell-info;
29 }
30 > dt {
31 text-align: left;
32 width: 12.5em;
Akronfc8dbae2019-02-15 13:16:20 +010033 padding: $item-padding;
Akron2f979122018-07-25 17:00:23 +020034 margin: 0;
35 }
36 > dd {
37 text-align: left;
Akronfc8dbae2019-02-15 13:16:20 +010038 padding: $item-padding;
Akron2f979122018-07-25 17:00:23 +020039 margin: 0;
40 width: 100%;
41 max-width: none;
42 max-height: 6em;
43 margin-left: $border-size;
44 white-space: normal;
45 overflow-y: auto;
46 overflow-x: hidden;
Akronfc8dbae2019-02-15 13:16:20 +010047 text-overflow: ellipsis;
Akron2f979122018-07-25 17:00:23 +020048 }
49 }
50}
51
52
53@media (min-width:640px) {
54 dl.flex > div {
55 width: 50%; // 2*
56 }
57}
58
59@media (min-width:800px) {
60 dl.flex > div {
61 width: 33.3333333333333%; // 3*
62 }
63}
64
65@media (min-width:1200px) {
66 dl.flex > div {
67 width: 25%; // 4*
68 }
69}
70
71@media (min-width:1680px) {
72 dl.flex > div {
73 width: 20%; // 5*
74 }
75}