Akron | baba3b6 | 2021-11-22 17:24:48 +0100 | [diff] [blame^] | 1 | @use 'sass:math'; |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 2 | @import "lengths"; |
| 3 | @import "mixins"; |
| 4 | |
Akron | 2f97912 | 2018-07-25 17:00:23 +0200 | [diff] [blame] | 5 | /** |
| 6 | * This defines flexible table cells |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 7 | * for views (including media queries). |
Akron | 2f97912 | 2018-07-25 17:00:23 +0200 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | dl.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%; |
Akron | baba3b6 | 2021-11-22 17:24:48 +0100 | [diff] [blame^] | 24 | border-width: math.div($border-size,2); |
Akron | 2f97912 | 2018-07-25 17:00:23 +0200 | [diff] [blame] | 25 | border-style: solid; |
| 26 | align-items: stretch; |
| 27 | > * { |
| 28 | @include cell-info; |
| 29 | } |
| 30 | > dt { |
| 31 | text-align: left; |
| 32 | width: 12.5em; |
Akron | fc8dbae | 2019-02-15 13:16:20 +0100 | [diff] [blame] | 33 | padding: $item-padding; |
Akron | 2f97912 | 2018-07-25 17:00:23 +0200 | [diff] [blame] | 34 | margin: 0; |
| 35 | } |
| 36 | > dd { |
| 37 | text-align: left; |
Akron | fc8dbae | 2019-02-15 13:16:20 +0100 | [diff] [blame] | 38 | padding: $item-padding; |
Akron | 2f97912 | 2018-07-25 17:00:23 +0200 | [diff] [blame] | 39 | 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; |
Akron | fc8dbae | 2019-02-15 13:16:20 +0100 | [diff] [blame] | 47 | text-overflow: ellipsis; |
Akron | 2f97912 | 2018-07-25 17:00:23 +0200 | [diff] [blame] | 48 | } |
| 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 | } |